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

I got a quick question, I got a news page called news.php and the index.php page, is it possible to have the content edited on the news.php page update on the index.php page as well so for example if I wrote TEST 1 on the news.php page within the couch CMS admin side it would update on index.php as well rather than having to update it twice on the news.php and index.php page

Thank you in advance

Kind regards

Ian
Hi,

I suppose you are displaying news.php content on index.php using the standard technique of specifying 'masterpage' parameter of cms:pages -
<cms:pages masterpage='news.php' ..

which essentially fetches page(s) from news.php and displays on index.php.

If so, any changes you make to news.php will automatically be reflected on index.php as both are showing the same data. You don't need to do anything special for this to happen.

Hope this helps.
Hi KK

Thank you for the reply, hope I am not annoying you

I have done the following

in news.php I got the following code

Code: Select all
<cms:editable name='news_content' toolbar='full' type='richtext'>
   
    </cms:editable>


The text I have put in on the admin couch cms side in the text box and is displaying on the news.php page

in index.php I have the following code

Code: Select all
<cms:pages masterpage='news.php'>
       
        </cms:pages>


Is that right as I am getting a blank space, it's like it is not pulling the data out from the news.php page and displaying on the index.php page

Sorry again

Ian
Ian, we also need to use cms:show to display the regions from a page.
Please modify your code to the following and it should work
Code: Select all
<cms:pages masterpage='news.php'>
        <cms:show news_content />
</cms:pages>

Hope this helps.
Thank you so much, really appreciate it

Is there a page listing all the couch cms tags so can get used to them so sorry again
We have a full section catering to the documentation.
Please see http://www.couchcms.com/docs/
Thank you so much, really appreciate it
Hello there,

I am new to couchcms, too. I think I have a similar problem but I still haven't understood the pages Option - or if it is even neccessary to do what I want to do.

Read this example: I have several pages, which all have a "static" information box on it. Until now, I included a single php-file via <?php include 'inc/informationbox.inc.php'; ?> in every page - which works fine but doesn't allow the user to edit these information in Couch. Creating a page from it also doesn't work because I would be nesting <cms:template /> into each other.
So can you tell me: how would you create an editable Snippet which displays on every site but needs to be edited only in one place?

Thank you for your support!

Warm regards,
mad
Hello and welcome madtrigger :)

The technique remains essentially the same for 'global values' that you are looking for.

For an illustrated example, please see http://www.couchcms.com/docs/tutorials/ ... -ends.html
Find the 'Global values' section on the page.

Hope this helps.
Exactly what I was looking for - thank you very much!
14 posts Page 1 of 2
cron