Forum for discussing general topics related to Couch.
6 posts Page 1 of 1
This is an awesome work and I am enjoying using this to help a friend creating a social service website. Thanks for that.

I have a common footer for all the pages, So i just want to have the contents editable at one place from the backend/admin panel

1.Currently adding the editable tags to all the pages is problematic as it will be shown in all pages
2. I tried using embed so , i created a page footer.inc and added all editable in that and used cms:embed to display, this works but this shows the contents from the footer.inc in all the pages where I used embed.
3. I thought of using pages, so i defined a footer.php and added cms:pages masterpage="footer.php" but this requires me to write each content that I need to display for each page.

How do I go about this situation.
My needs, common footer template, single page to edit this in admin panel, show the same content in all pages.

Thanks a lot.
Hi balamax :)

Please see http://docs.couchcms.com/tutorials/port ... bal-values
I think you should define the footer (i.e. all editable regions shown in it) in a global template, as explained in the docs above. This way you'll have to define it just once and can use it at multiple places.

Hope it helps. Do let us know if something seems unclear.
Thanks.
ok, got it. But my footer is bit complicated.
1 -> So I am creating the globals.php with some editables in it.
2 -> Defining my layout and the cms:show values inside this as a template snippet in footer.inc which is in snippets folder.
3-> Using the footer.inc as embed in all the pages.

problem i have now is -> <cms:pages masterpage="../../globals.php">

this is not working to refer my globals.php in root folder.

If i move the globals.php to snippets folder I am not seeing the template definition in the admin side.

How to go about this.?
<cms:pages masterpage="../../globals.php">

If the statement above is the exact statement you are using, the highlighted value is not correct.
It is supposed to be the name of a template and will never have the '..'.

Allow me to explain.
If the template is in the site's root (which for Couch is the parent folder of the 'couch' folder), the name is simply the physical file's name e.g. 'globals.php'.

If, however, the template is in a sub-folder the name of the template will have the subfolder prepended e.g. if globals.php is in a subfolder named 'extra', its name would become 'extra/globals.php'.

In case of any confusion, hover your mouse on the template's entry in admin side-bar and you'll get a tooltip showing the template's name as recognized by Couch.

In your case you say that the globals.php in right in the site's root so you should use
<cms:pages masterpage="globals.php">


In case you still have trouble, please zip all relevant files and PM them to me.
Thanks.
:lol: :lol: :lol: :lol: :lol: :lol:
You are awesome :ugeek:
I'm glad to be able to assist :)
6 posts Page 1 of 1