Forum for discussing general topics related to Couch.
5 posts Page 1 of 1
Why would this:

<code>
<cms:pages masterpage='news/blog.php'
paginate='1'
limit='3'
>

<div class="post">
<!-- Post Title -->
<h3 class="title"><a href="<cms:show k_page_link />"><cms:show k_page_title /></a></h3>
<!-- Post Data -->
<cms:if k_page_foldertitle >
<cms:set my_category=k_page_foldertitle />
<cms:else />
<cms:set my_category='Uncategorised' />
</cms:if>
<p class="sub"><a href="#"><cms:date k_page_date format='m-d-Y'/></p>
<div class="hr dotted clearfix">&nbsp;</div>
<!-- Post Image -->
<img class="thumb" alt="" src="<cms:show blog_image />" />
<!-- Post Content -->
<cms:excerptHTML count='75' ignore='img'><cms:show blog_content /></cms:excerptHTML>
<!-- Read More Button -->
<p class="clearfix"><a href="<cms:show k_page_link />" class="button right"> Read More...</a></p>
</div>
<div class="hr clearfix">&nbsp;</div>

<cms:if k_paginated_bottom >
<!-- Blog Navigation -->
<p class="clearfix">
<cms:if k_paginate_link_next >
<a href="<cms:show k_paginate_link_next />" class="button float">&lt;&lt; Previous Posts</a>
</cms:if>

<cms:if k_paginate_link_prev >
<a href="<cms:show k_paginate_link_prev />" class="button float right">Newer Posts >></a>
</cms:if>
</p>
</cms:if>

</cms:pages >
</code>

Be returning this:

Image

When I hover over the template in the cms admin panel the path for the template is 'news/blog.php'

Image

Thanks for any help you can give. This is my first foray into CouchCMS.
Hello and welcome to our forums, Steve :)

You are right, the code you posted shouldn't be throwing that error.
Perhaps it is come other portion of code on the template (or even in some embedded snippet) that is doing so?

Please take a second look at other parts of the template to see if you can spot something (it is not only cms:pages but several other tags that take a 'masterpage' parameter).

If nothing is found, you can PM me your site's access creds (FTP+Couch) and I'll be glad to take a look myself. If the site is still on localhost, please PM me the template plus all snippets embedded in it.

Thanks.
Hi Steve,

Thanks for entrusting me with the creds.
I logged-in and had a look.

I see that you have renamed the 'couch' folder as 'news' (which is fine)
and have placed the 'blog.php' template (and also the snippets) within the 'news' folder - which is totally not fine.

The blog.php template needs to reside within your site's root (or a sub-folder - but not the Couch folder). The snippets need to go within 'couch/snippets' or a folder designated in config file to hold the snippets.

Think of it this way - Couch is meant to be retrofitted within existing sites. So whatever structure your site had (e.g location of the blog template) will remain unchanged after you drop in the 'couch' folder into your site's root.

Please do the following - move blog.php out of the couch folder into the root, make the topmost PHP line <?php require_once( 'news/cms.php' ); ?> and access it to get it registered.
Now you can use the 'masterpage' parameter as simply 'blog.php'.

Hope this helps.
Thanks! That solved my problem completely. I really appreciate the excellent support. It looks like CouchCMS is going to be my new Go To for as many clients as I can convince to move away from Wordpress when it is not necessary. Looking forward to really getting to know the system.
You are welcome, Steve :)
Feel free to let us know if you have any questions as you explore Couch.
5 posts Page 1 of 1
cron