Problems, need help? Have a tip or advice? Post it here.
4 posts Page 1 of 1
Hello,
I know time is critical so I'll bare-bones this question.

I have a custom route defined:
Code: Select all
<cms:route name='author_view' path='author/{:author}' >

and matched:
Code: Select all
<cms:else_if k_matched_route='author_view' />
   <cms:embed 'blog/blog-author.php' />


I have a link:
Code: Select all
<a href="<cms:route_link 'author_view' rt_author=author />" >


It links and goes to the correct page:
Code: Select all
...mysite/blog.php?q=author/authorname


when I <cms:show rt_author /> it returns the correct author's name.

However, when I try to list the pages via that author with:
Code: Select all
<cms:pages masterpage='blog.php' custom_field='author=rt_author' paginate='1' limit='10'>

I get 0 listings. I've hardcoded the author and it works just fine. The <cms:show.../> shows it correctly. I'm not sure why this pages tag won't work to list only the blogs by the particular author.

The author is defined in the template as this:
Code: Select all
 <cms:editable name="author" label="Choose Author" opt_values="<cms:pages masterpage="about.php" orderby="page_name" order="asc" ><cms:show k_page_title />=<cms:show k_page_name /> | </cms:pages>" type="dropdown"/>
    <cms:editable type='relation' name='page_author' masterpage='about.php' />


I'm assuming that has something to do with it, but since <cms:dump /> shows the correct variable, I can't imagine why it won't list the pages.

Any advice in helping me with the correct 'pages' code would be greatly appreciated.

Thanks and COUCH ROCKS!! :mrgreen: :mrgreen:
Hi,

Instead of the current code you are using for listing -
Code: Select all
<cms:pages masterpage='blog.php' custom_field='author=rt_author' paginate='1' limit='10'>

- please try the following
Code: Select all
<cms:pages masterpage='blog.php' custom_field="author=<cms:show rt_author />" paginate='1' limit='10'>
Make sure to use double-quotes with 'custom-field'.

Does this help?
I tried it so many ways, but never just double-quoting the whole thing. But, because of COUCH being the all-around awesome tool that it is, I KNEW the solution was there, and that is was simple. I am almost embarrassed to have had that as a problem.

Thank you KK, for this and all the help you give me and everyone else. This forum is a really good learning tool.

I even love to just keep coming back and checking out the new announcements. Can't wait for the grand update!!!!

Thank you KK, you are an incredible human being!
You are always welcome, scratz.
Thank you very much indeed for your very kind words :)
4 posts Page 1 of 1
cron