Forum for discussing general topics related to Couch.
2 posts Page 1 of 1
I'd like to show content from another page: is there code like this:

Code: Select all
<cms:show content 'template.php?p=11' />


where I can define the content of a page by referring to another page?
Hi norseweb,

There are two ways of showing content from one page in another.

Suppose the page containing the content is named 'my_page' and it is a cloned page of template 'my_template.php' and the particular editable region containing the content is named 'my_text' -

1. Using cms:pages tag
Code: Select all
<cms:pages masterpage='my_template.php' page_name='my_page' >
   <cms:show my_text />
</cms:pages>


2. Using cms:get_custom_field tag
Code: Select all
<cms:get_custom_field 'my_text' masterpage='my_template.php' page='my_page' />

NOTE: If the template happens to be non-clonable, we can skip the 'page_name' parameter in both the methods above.

Hope this helps.
2 posts Page 1 of 1