Hi nateiler,
If you need to save some db calls, you can use Category Id plugin together with Category Info plugin. It would be more efficient than to use Category Id together with Child Categories.
This might be the wrong place to ask but I’d like to generate a menu like this that display regardless of the url….
Category title Entry 1 Entry 2 Entry 3 Category title 2 Entry 4 Entry 5 Entry 6
I basically need a plugin that loops through categories in a set group and output their category id. I thought this plugin could do something like this but it appears it can’t.
{exp:category_id category_group="12" parse="inward"}
{exp:weblog:entries weblog="{segment_1}" category="{category_id}" limit="999" disable="member_data|pagination|trackbacks" dynamic="off"}
{if count =="1"}{categories show_group="12"}<li class="cat">{category_name}</li>{/categories}{/if}
<li{if "{url_title}"=="{segment_2}"} class="current"{/if}><a href="http://{url_title_path={segment_1}}">{title}</a></li>
{/exp:weblog:entries}
{/exp:category_id}
Hi Laisvunas,
I am working with the Category ID module and need to add a conditional. Currently I am using it to highlight the Category name on dynamic pages as follows:
{exp:category_id category_group="2" category_url_title="{segment_3}" parse="inward"}
{exp:weblog:entries weblog="intro-text" category="{category_id}" site="1" limit="1"}
{categories show="{category_id}"}
<h2>{category_name}</h2>
{/categories}
{/exp:weblog:entries}
{/exp:category_id}
I then have a generic catch all entry from a weblog as follows:
{exp:weblog:entries weblog="intro-text" limit="1" disable="trackbacks|member_data|pagination"}
{intro-text}
{/exp:weblog:entries}
I need to be able to have category-specific entries for each sub category that is displayed instead of the generic entry when there is one. So I need to be able to do something like this:
if there is an intro-text entry for this sub-category show it, otherwise, show the generic intro-text entry.
I just need a little help to integrate this into the category_id plugin syntax.
Thanks.
Hi Laisvunas,
Cancel that request. I just figured it out:
{if intro-text !=""}
{exp:category_id category_group="2" category_url_title="{segment_3}" parse="inward"}
{exp:weblog:entries weblog="intro-text" limit="1" category="{category_id}" disable="trackbacks|pagination|member_data" parse="inward"}
{intro-text}
{/exp:weblog:entries}
{/exp:category_id}
{if:else}
{exp:weblog:entries weblog="intro-text" limit="1" disable="trackbacks|member_data|pagination"}
{intro-text}
{/exp:weblog:entries}
{/if}
Thanks.
This segment of code was working perfectly to show the name of the sub-category at the top of the page content area, but now it is broken and does not show here.
{exp:category_id category_group="2" category_url_title="{segment_3}" parse="inward"}
{exp:weblog:entries weblog="intro-text" category="{category_id}" site="1" limit="1"}
{categories show="{category_id}"}
<h2>{category_name}</h2>
{/categories}
{/exp:weblog:entries}
{/exp:category_id}
I would really appreciate some help to understand why and how to get it to show again.
Thank you!
Forrest
Hi,
I released version 1.6 of Category Id plugin.
New features:
1) it’s now possible to use category group names as values of “category_group” parameter;
2) pipe character can now be used inside the value of this parameter to specify several category groups. In case you use pipe character, make sure category url titles are unique.
Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.