What’s the most efficient way to implement category based templates?
For example, if I post into a category (assuming only one category is used per post), how can I have a template defined for that category that the post will show up in?
This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.
The active forums are here.
November 10, 2011 11:24am
Subscribe [3]#1 / Nov 10, 2011 11:24am
What’s the most efficient way to implement category based templates?
For example, if I post into a category (assuming only one category is used per post), how can I have a template defined for that category that the post will show up in?
#2 / Nov 10, 2011 2:45pm
Matt,
Are you looking for something like this:
{exp:channel:categories channel="" style="linear" }
<h1>{category_name}</h2>
<div id="" class="">
{exp:channel:entries
channel=""
disable="member_data|pagination|trackbacks"
dynamic="no"
category="{category_id}"
}
*info here*
{/exp:channel:entries}
</div><!—end #—>
{/exp:channel:categories}This can be a bit heavy on resources at times, but does make it easy to list out entries by category.
#3 / Nov 10, 2011 9:12pm
Matt Borja,
Does that help you out? If there is anything else I can do, please let me know.
Vim Interactive, thanks for the assist.