Thanks to all who are working on improving category options for us all! Can any of the cat experts tell me if one of the plugins can do this? I want to NOT have a parent category as hyperlink but only the subcategories links in a nested list. Where a category is not a parent it should be a link. Is this possible?
Thanks to all who are working on improving category options for us all! Can any of the cat experts tell me if one of the plugins can do this? I want to NOT have a parent category as hyperlink but only the subcategories links in a nested list. Where a category is not a parent it should be a link. Is this possible?
Like exactly what exp:weblog:categories does but the parent categories are no links? Shouldn’t be that hard to make. What about subcategories that are parent to another level of subcategories?
Thanks to all who are working on improving category options for us all! Can any of the cat experts tell me if one of the plugins can do this? I want to NOT have a parent category as hyperlink but only the subcategories links in a nested list. Where a category is not a parent it should be a link. Is this possible?Like exactly what exp:weblog:categories does but the parent categories are no links? Shouldn’t be that hard to make. What about subcategories that are parent to another level of subcategories?
Speaking for myself: all subcategories BELOW the FIRST parent would be a link. Only the Parent would not be a link. Ideally this would eventually be an option/setting within EE, but in the meantime a plugin that does this would be something that I could use. RE: Subcatergories within subcategories - I can’t see that they would ever not be links as there is no point in listing them if they are not links.
Well, to keep it simple and not use any additional SQL-queries, the attached plugin just takes the output from weblog:categories and removes the link-tags from the first level of <li>-elements.
Usage: Just wrap the tags around a pair of {exp:weblog:categories}-tags.
Example:
{exp:cat_parent_nolink}
{exp:weblog:categories weblog="default_site"}
<a href="http://{path=site/index}">{category_name}</a>
{/exp:weblog:categories}
{/exp:cat_parent_nolink}
Give it a try, if you like.
Well, to keep it simple and not use any additional SQL-queries, the attached plugin just takes the output from weblog:categories and removes the link-tags from the first level of <li>-elements. Give it a try, if you like.
I tried it but it had no effect on the output.
PS i have three parents and one of these has sub-cats CAT1 CAT2 sub1 sub2 sub3 CAT3
Hi - here is what i have:
I have tried it two ways. With {exp:cat_parent_nolink} before and after {exp:weblog:categories}. The output remains the same with or without the plugin. I also had problems with the other plugin: Category Expander (v.1.0 [EE 1.6])
PS many thanks for all your work.
{exp:cat_parent_nolink} {exp:weblog:categories weblog="{my_weblog}” show_empty=”no” style=”nested”} <!–<li>Categories</li>–> <li>{category_name} </li> {/exp:weblog:categories} {/exp:cat_parent_nolink}
Remove the bolded li-tags. You don’t need them. style=”nested” creates the list for you.
{exp:cat_parent_nolink}
{exp:weblog:categories weblog="{my_weblog}" show_empty="no" style="nested"}
<!--<li><strong>Categories</strong></li>-->
<a href="http://{path={my_template_group}/index}">{category_name}</a>
{/exp:weblog:categories}
{/exp:cat_parent_nolink}
{exp:cat_parent_nolink} {exp:weblog:categories weblog="{my_weblog}” show_empty=”no” style=”nested”} {category_name} {/exp:weblog:categories} {/exp:cat_parent_nolink} Remove the bolded li-tags. You don’t need them. style=”nested” creates the list for you.
Yes that works…. a little too well! It aso removes the links function from main Categories that I wish to remain as links!
If a category has no sub-categories or children it should remain as a LINK. But if a parent Catergory has Children it it is NOT a link. Is this possible?
If a category has no sub-categories or children it should remain as a LINK. But if a parent Catergory has Children it it is NOT a link. Is this possible?
This is possible, too. Note, this time the plugin-tag goes inside the {exp:weblog:categories}-tag.
This removes the link from top-level categories if they have subcategories.
{exp:weblog:categories weblog="{my_weblog}" show_empty="no" style="nested"}
{exp:cat_parent_nolink2 cat_id="{category_id}"}
<a href="http://{path={my_template_group}/index}">{category_name}</a>
{/exp:cat_parent_nolink2}
{/exp:weblog:categories}
Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.