Is it possible to get the category ID or category name of the current page and then list other entry titles associated with the same category?
This is so I can change an article list according to whatever category is currently being viewed.
Thanks
This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.
The active forums are here.
March 16, 2008 10:07am
Subscribe [2]#1 / Mar 16, 2008 10:07am
Is it possible to get the category ID or category name of the current page and then list other entry titles associated with the same category?
This is so I can change an article list according to whatever category is currently being viewed.
Thanks
#2 / Mar 16, 2008 10:28am
docs-related_categories mode will do that.
#3 / Mar 16, 2008 11:45am
Brilliant! Thanks for your help.
By default it seems to literally list all OTHER entries. Is there a way to retain the current entry title also?
It’s no real problem if it can’t be done.
Thanks again
#4 / Mar 16, 2008 5:55pm
EE can do anything 😊
As one is on the page, I assume you wouldn’t want it as a link,
Or even at the top?
Many ways to arrive at the same place.
One is to use weblog:entries tag above the list, but below ul.
{exp:weblog:entries limit="1" weblog="{my_weblog}" disable="member_data|trackbacks"}
<li><b>{title}</b></li>
{/exp:weblog:entries}Otherwise pass the category id on the weblog:entries tag instead of related_categories..