Forum for discussing general topics related to Couch.
3 posts Page 1 of 1
Hi,
Is there a way to access another file from another directory. For instance I would like to access a file called media.php located in another directory as such;

<cms:pages masterpage="../media.php">

<cms:show k_page_title />
</cms:pages>

Thanks in advance.
Hi,

It'd be easier for you to figure this out by keeping just one point in mind - the 'masterpage' parameter expects just the 'name' of a template.

The 'name' happens to be automatically assigned by Couch while registering a template and follows some very simple rules -
if a template, let us call it 'index.php', is placed in the root of your site (where 'root' is always the parent folder of your 'couch' folder), the 'name' is simply 'index.php'.

If the template is placed in a subfolder of the root named 'blog', the name of the template becomes 'blog/index.php'.
If the folder structure happens to be 'blog/en', the name of the template becomes 'blog/en/index.php'.
TIP: You can see the name assigned to the template by hovering your mouse over the template's entry in the sidebar.

So, once you know the template's name, just use that with the 'masterpage' parameter anywhere in your site and that would suffice.

Hope this helps.
Thank you KK, I changed my directory setup and masterpage was able to work perfectly the way you explained it.

Thank you once again.
3 posts Page 1 of 1
cron