by
KK » Fri Jun 17, 2011 1:45 am
Hi,
Thanks. I had a look at the code.
The snippet you are using to display a single post by a particular user is
- Code: Select all
<cms:pages masterpage='news.php' custom_field='my_news_author==admin'limit='1'>
(by the way, there should be space before the
limit )
The snippet above expects an editable region by the name of 'my_news_author' in your 'news.php' template that contains the term 'admin'.
Your 'news.php' has no such region so please add an editable region (type 'text' will be fine)
in 'news.php' this way
- Code: Select all
<cms:editable
name='my_news_author'
label='Author'
type='text' />
Access 'news.php' through your browser for Couch to pick up the changes.
This will add a textbox in each of your news item.
Please edit all existing news posts to fill up this empty new field with the author's name.
Once the data is in place (i.e. each news post has its author's name within the 'my_news_author' field), the following snippet should work -
- Code: Select all
<cms:pages masterpage='news.php' custom_field='my_news_author==admin' limit='1'>
Do let me know if you have any problem.