Problems, need help? Have a tip or advice? Post it here.
13 posts Page 1 of 2
I'm new to Couch and started doing the tutorial to get familiar with it. When I got to the Blog chapter I found that the template for Blog didn't appear. I've followed all the steps but I just don't understand why I can only create the About template and nothing else.

I later tried uploading the finished code file (found at the end of the tutorial) and then uploading that but still only the About page appeared in Couch.

I don't know what to do, I was wondering if it had to do permissions?

Since you got the 'about-us' template working, the problem is unlikely to be permission related.

Are you sure you followed these exact steps -
1. Login as super-admin
2. While still being logged in as super-admin, access using the same browser (another instance or tab).
3. Come back to the admin and refresh the browser.

The 'blog' template should appear in the list of added template. If it does not, please go back to the blog.php and view its source in the browser (e.g. for FF view=>Page Source from browser's menu). Take a look if you can see any error message anywhere within the source. This should give a clue.

Finally, if nothing works and you happen to be testing on a server accessible through the Internet, you can PM us your FTP and Couch credentials and we'll try and find what is going wrong.
Hi there, thanks for you help I managed to resolve this issue.

I do have a follow up question however. I'm currently doing the 'Diving deep - the Blog' section of the tutorial and I was wondering if its possible to show one entry from the blog, by a particular user, on another page. For example showing that entry on the homepage even though its outside the blog.php structure that is created in this chapter of the tutorial?

Glad the issue was resolved.

Answering your query -
In Couch you can list pages cloned out of any template just about anywhere.
It is normal to list pages of several different templates on the home page of a site.

The key to listing pages of a particular template on a different template is the 'masterpage' attribute of the 'pages' tag.

The following snippet will display the titles of the latest 5 blog posts on any template this snippet is placed in.
Code: Select all
<cms:pages masterpage='blog.php' limit='5'>
     <cms:show k_page_title /><br>

You can fine tune the pages fetched in by the 'pages' tag by using the several parameters this tag supports. Please see for details.

Hope this helps.
Thanks for getting back to me. So if I wanted to show 1 entry from the blog on my homepage by the user 'admin' would I do this?

Code: Select all
<cms:pages masterpage='blog.php' custom_field='my_blog_author!=admin' limit='5'>
<cms:show k_page_title /><br>
Try -
Code: Select all
<cms:pages masterpage='blog.php' custom_field='my_blog_author==admin' limit='1'>
   <cms:show k_page_title /><br>
Oops! Forgot about changing the limit.

I've tried the code you suggested but got this error message:

ERROR: Custom Field "my_news_author" does not exist

Any ideas? I'll keep trying.
In the example, "my_news_author" refers to editable region by the same name in template 'blog.php'.

In your case you should substitute it by the name of editable region you use to store the author's name.

If you have any difficulty, PM me your entire template.
So, do I first need to define my_news_author in news.php? I'm not following you.

When I did...
<cms:pages masterpage='news.php' custom_field='admin' limit='1'> worked fine. However, if I try it with another user e.g. changing custom_field='admin' to custom_field='user2' then it still just displays the latest post by admin instead of the latest post by user2.

Thank you for your help with this, I'm sure it's all very straightforward but I find code quite intimidating! :oops:
You're certainly not alone in being intimidated by 'code' :)
But don't worry, it is not that difficult once you get a hang of it.

I am not sure how you have structured your template i.e. what editable regions you have defined.
So instead of shooting in the dark, I'd like to take a look at your template. Could you kindly get me that please?
13 posts Page 1 of 2

Who is online

In total there are 10 users online :: 0 registered, 0 hidden and 10 guests
(based on users active over the past 5 minutes)

Users browsing this forum: No registered users and 10 guests