Forum for discussing general topics related to Couch.
7 posts Page 1 of 1
Hi

don't think couchcms likes me much yesterday and today, I used to have services.php as a nested page but removed it and just made it a normal page that could be edited by couchcms so I removed the nested part in the php file and uploaded it again and on couchcms side, it said remove editable section so deleted it and now it just says No Editable Regions defined, I have tried deleting the file off the ftp server and it then says remove template so thought it would start again from scratch but uploaded it again and it says again No Editable Regions defined, I have tried clearing the cache, visiting the page while logged in as super admin, renaming the editable content but still no joy, my code is below

Code: Select all
<?php require_once( 'cms/cms.php' ); ?>

<cms:template title='Services' order='1'>

</cms:template>

<cms:editable name='services_content' toolbar='full' type='richtext' order='1'>
TEXT
</cms:editable>

<?php COUCH::invoke(); ?>
Please move your cms:editable within the cms:template tag.

<cms:template>
<cms:editable />
</cms:template>

Hope this helps.
I have moved the line
Code: Select all
<cms:editable name='services_content' toolbar='full' type='richtext' order='1'>
so now it looks like the following

Code: Select all
<cms:template title='Services' order='1'>

<cms:editable name='services_content' toolbar='full' type='richtext' order='1'>

</cms:template>


but I got the error ERROR! Closing tag "template" has no matching opening tag (line: 3 char: 144)

If I move the closing
Code: Select all
</cms:editable>
to within the template tags it works on the admin side but has no content in the textarea box
I got it to show the content on the admin side as I put some sample text content in between the cms editable tags but on the front end, the content is not showing, I have the following coding

Code: Select all
<cms:template title='Services' order='1'>

<cms:editable name='services_content' toolbar='full' type='richtext' order='1'>

<p>
          <em>
          Company Name is a small friendly family run business based in Haverhill, Suffolk. We provide IT Support, Repairs, Servicing and sales of new and refurbished hardware, for homes and businesses.
          </em>
        </p>

      <h3>IT Repairs / Servicing</h3>
       
        <p>
        We provide repairs and servicing on all computers, laptops, software and hardware. No job is too big or too small! We can also offer support contracts for your business needs.
        </p>

      <h3>Sales</h3>

      <p>
        We can provide you with all your IT needs, whether its a new or refurbished PC or laptop, we can help. Contact us on sales@nicomIT.co.uk or find us on Facebook.
        </p>

</cms:editable>

</cms:template>


Code: Select all
<cms:show services_content />


It used to work before without having to move the couchcms tags to within the template tags and not had to do it like this on other sites I have integrated couchcms into

could it be another issue like maybe a php version incorrect or something
I have sort of got it working, I think the issue could be because I have includes/header.php and the coding in that looks like the following

Code: Select all
<?php require_once ( 'cms/cms.php' ); ?>
<?php ob_start(); ?> ---> I PUT THIS LINE IN AS WAS GETTING Warning: Cannot modify header information - headers already sent by error, SINCE I PUT THIS LINE, THE ERROR HAS GONE
<!DOCTYPE html>
<html lang="en">

<head>
    <title><?php echo $title; ?></title>
    <meta charset="utf-8">
     <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta name="description" content="<?php echo $pgDesc ?>">
   <link rel="stylesheet" href="./css/main.css" type="text/css" media="screen">
</head>
<body class="home cbp-so-scroller" id="cbp-so-scroller">

<!-- Mobile Menu  -->
<div class="header">
  <a href="#menu" class="button">menu</a>
  <a href="contact.php" class="btn">free quote</a>     
  <a class="tell" href="tel:"><span>Call</span></a>
</div>

<!--MOBILE MENU-->
<cms:embed 'menu.html' />

<div class="site-container" id="home">
 
<!-- Header -->
<header class="site-header">
   <a href="index.php" class="logo"><img src="images/logo/nicom-logo-transparent.png" alt=""></a>
   <div class="top-header">
    <a href="contact.php" class="btn">free quote</a>     
    <p class="phone">
      <i class="fa fa-phone" aria-hidden="true"></i>
      <a href="tel:"></a>
    </p>
    <p class="companyname">
   
    </p>
    <ul class="socials">
      <li><a href="" target="_blank"><i class="fa fa-facebook" aria-hidden="true"></i></a></li>
      <li><a href="#" target="_blank"><i class="fa fa-twitter" aria-hidden="true"></i></a></li>
      <li><a href="#" target="_blank"><i class="fa fa-linkedin" aria-hidden="true"></i></a></li>
      <li><a href="#" target="_blank"><i class="fa fa-pinterest" aria-hidden="true"></i></a></li>
    </ul>

   </div>

<!-- DESKTOP MENU-->
<cms:embed 'menu.html' />

</header>
<?php COUCH::invoke(); ?>


My services.php file now looks like the following coding

Code: Select all
<?php require_once ( 'cms/cms.php' ); ?>

<?php
$title = "Services - Nicom IT Services";

$pgDesc="";

include ( 'includes/header.php' );
?>

<cms:template title='Services' order='1'>

</cms:template>

<!--      SUB  HEADER       -->
<div class="sub-page-header">
  <img src="images/sub-page-header.jpg" alt="">
  <div class="sub-header">
    <div class="container">
      <p>Services</p>
    </div>   
  </div>
</div>

<!--      SUB PAGE CONTENT       -->
<div class="sub-page-content">
  <div class="container">
    <div class="row">
      <div class="col-sm-7 col-md-8 col-lg-9">
        <h1>SERVICES</h1>
        <p>
        <cms:editable name='services_content' toolbar='full' type='richtext' order='1'>
          <em>
          Nicom IT Services is a small friendly family run business based in Haverhill, Suffolk. We provide IT Support, Repairs, Servicing and sales of new and refurbished hardware, for homes and businesses.
          </em>
        </p>

      <h3>IT Repairs / Servicing</h3>
       
        <p>
        We provide repairs and servicing on all computers, laptops, software and hardware. No job is too big or too small! We can also offer support contracts for your business needs.
        </p>

      <h3>Sales</h3>

      <p>
        We can provide you with all your IT needs, whether its a new or refurbished PC or laptop, we can help. Contact us on sales@nicomIT.co.uk or find us on Facebook.
        </cms:editable>
        </p>
       
</div>
     
    </div>
  </div>
</div>

<?php include( 'includes/footer.php' ); ?>
<?php COUCH::invoke(); ?>


The only issue I can see now is at the very bottom of the page is the nav menu, how can I get rid of that, the url is http://www.nicomit.co.uk/services.php
Just found another issue and first time I have came across this issue, I feel like giving up and starting again with it as been a pain right from the start with this one

if I log out of the admin side and log in again, the admin side on services.php file says field not found and says delete permanently or view code

if I view the services.php page while logged in as super admin and refresh the services on the admin side, the text about deleting the field permanently or view code disappears

can anyone help with that as getting really fed up with it now
UPDATE: Think I have sorted the delete perm issue as I removed the couchcms tags from the includes/header.php file and not getting that issue now so that's good

The only issue I can see now is that the nav menu is appearing at the bottom now for some weird reason, the weird thing is that it does not show in the source code of the services.php file
7 posts Page 1 of 1
cron