You know I wuvya, Ryan. That said - it’s not an all-out rule; it depends on the license. If the top of that pretty file says “GPL” or another such license, then you can modify/redistribute it under those terms. But if it says “Copyright” - then you must respect that, too. Just wanted to clarify; I did check MF’s file before I removed the attachment. =)
Oh, I know, Lisa. There’s pwenty of wuv to go around in these here forums.
I really like the integrity of the modules, plugins, and extensions around here, in part because they’re “policed” to make sure no one’s toes get stepped on.
does anyone know if you have access to segment variables with this plugin? Here is my template code:
<ul class="subnav">
{exp:subcategories root_node="5" sort_by="custom_order" }<li{if segment_3==category_url_title} class="selected-green"{/if}><a href="http://{path=">{category_name}</a></li>
{/exp:subcategories}
</ul>
I already added mdesigns new hooks to be able to use category_url_title.. If this isn’t possible is there a different method to achieve what I am trying to do here without using yet another plugin/extension? Thanks
Hi all. Love the plugin, it has saved me heaps of time (damn I love this active community!!). Quick question…
Has anyone gotten “weblog:entries” to work within the plugin? For example I want to do the following:
{exp:subcategories root_node="1" count_entries_from_weblogs="2" sort_by="custom_order"}
{if "{entries_count}" > 0}
<h3>{category_name}</h3>
{exp:weblog:entries category="{category_id}" weblog="services" disable="member_data|trackbacks" }
- {title}
{/exp:weblog:entries}
{/if}
{/exp:subcategories}
Any suggestions are very welcome. I am even happy to hack the plugin if necessary, but don’t know the EE API well enough as yet to do this on my own.
Thanks.
EDIT: Sorry I should have said that the {category_name} is being pulled out fine, but I am not getting anything from the “weblog:entries” tag. I looked at the debugging output an it is not converting the {category_id} to an integer (but rather passing out “{category_id}” exactly as I have written it.
You might try embedding that entries tag. Put your entries tag on a new template (note the new word ‘embed’ I put in there!:
{exp:weblog:entries category="{embed:category_id}" weblog="services" disable="member_data|trackbacks" }
- {title}
{/exp:weblog:entries}
Then update your first template to embed the new template and pass along the category_id using an embed variable, like this:
{exp:subcategories root_node="1" count_entries_from_weblogs="2" sort_by="custom_order"}
{if "{entries_count}" > 0}
<h3>{category_name}</h3>
{embed="template_group/template_name" category_id="{category_id}"}
{/if}
{/exp:subcategories}
Change “template_group/template_name” to the actual ones you have. Maybe it’s “site/category_entries” or something similar. This is untested, so let us know if that worked!
Hi Karlo,
What do you mean by “how could I get the root_node”? It really depends on what you are trying to do. For example, you could simply hard code the root_node…
{exp:subcategories root_node="5"}
{category_name}
{/exp:subcategories}
Where root_node “5” is the parent category id. Obviously change the id to whatever it is you want.
Or if you have a dynamic category page, you could use the category_header tag to get the category id of the page (this is exactly how I am using the subcategories plugin!):
{exp:weblog:category_heading weblog="my_weblog"}
{exp:subcategories root_node="{category_id}"}
{category_name}
{/exp:subcategories}
{/exp:weblog:category_heading}
Does this answer your question?
Cheers.
Thanks to mdesign I’m now able to pull in the category_url_title. However, I’m one of those people that likes to remove ‘/index.php/’ from my urls and usually do this by the Replace plugin… which won’t work within the subcategories plugin.
Does anyone know how I can remove ‘index.php’ from:
<a href="http://{path={my_template_group}/{category_url_title}}">{category_name}</a>
Thanks in advance
Jim
Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.