Forum for discussing general topics related to Couch.
3 posts Page 1 of 1
I'm trying to setup a Related Articles section which basically shows in page view, at the end of each article, the latest 3 articles from the same category. Here is the code:
Code: Select all
<cms:pages masterpage='news.php' folder=k_page_foldername limit='3' >   
    <div>
        <h1><a href="<cms:show k_page_link/>"><cms:show k_page_title /></a></h1>
        <p><cms:show k_page_foldertitle /> / <cms:show k_page_date /></p>
        <img src="<cms:show foto />" width="274" height="120" alt="" />
        <cms:excerptHTML count='20' ignore='img'><cms:show article /></cms:excerptHTML>
    </div>
</cms:pages>

As it might happen that the current article is one of the 3 latest articles from a category, I need to get rid of this current article from Related Article section and show another one instead of it. The problem is I don't know how :(
Try adding the following to your 'pages' tag:
Code: Select all
id="NOT <cms:show k_page_id />"
Perfect! Thanks cheesypoof.
3 posts Page 1 of 1
cron