Category Parents
ExpressionEngine 2
Back to this add-on's main page
View Other Add-ons From Yuri Salimovskiy
Accept cat_url_title parameter
Feature Request
Sy
|
Posted: 25 February 2013 09:17 PM |
|
|
|
This is a useful plugin that I’ve been using for a while now. I do think it would be useful to add the cat_url_title parameter too, where I get the categories’ url title for it’s parents. Do you think you could incorprate this into the addon?
I have an example of how I added this myself to the addon which works. Hopefully this will be of use:
I replaced the line “if ($category<=0) return;” at the top of each function with:
$cat_url_title = $TMPL->fetch_param('cat_url_title') ? $TMPL->fetch_param('cat_url_title') : ''; if (!empty($cat_url_title)) { $q = $DB->query("SELECT cat_id FROM exp_categories WHERE cat_url_title='$cat_url_title'"); $category = $q->row('cat_id'); } if ($category<=0 || !is_numeric($category)) return;
Thanks
|
|
|