Forum for discussing general topics related to Couch.
2 posts Page 1 of 1
Hello,
Firstly just want to say how awesome CouchCMS is! it's what i've been looking for quite a while now :)

I just wanted to ask how would I get PHP includes editable?
On my website I have a sidebar with things like newsletters and they should be the same on every page once updated. I'm not quite sure how I would go back setting this up

Any help would be great

Thank you :)
Robert
Hello and welcome, Robert :)
I am glad you liked Couch.

Replying to your query -
I suppose you want to make editable only the HTML parts in the PHP includes.
If so, you need to use the regular cms:editable tags to do so.

One point to consider is that - suppose you define an editable region in a PHP include and then, suppose, that PHP file is included in 3 Couch templates. Doing so will cause that editable region to show up in all the 3 templates.

You'd rather want to have the editable region to be shown only at one place so that changing contents within one place gets reflected on all the templates using the PHP include.
For this you need to define the editable regions 'globally' - this entails using a separate template.
Please see the 'Global values' section on the following page of our tutorial -
http://www.couchcms.com/docs/tutorials/ ... -ends.html

Do let us know if you require any help.

Thanks.
2 posts Page 1 of 1
cron