Taxonomy
ExpressionEngine 2
Back to this add-on's main page
View Other Add-ons From iain
root_node_url_title not constrained to assigned tree channel
Support Request
ACER OS
|
Posted: 06 July 2016 07:36 PM |
|
|
|
Hi
I have a site with a large number of channels. I’m using root_node_url_title=”{segment_1}” to create a generic side navigation for pages. Segment 1 is “research” and is assigned as an entry to the node and the entry has a url_title of “research”. When the taxonomy:nav tag is parsed with the root_node_url_title parameter as {segment_1} I don’t get any menu coming out. I’ve traced it through the code and the problem arises from the function “function entry_id_from_url_title($url_title)” in the Taxonomy_model class. It doesn’t appear to take into account the channel that has been assigned to tree, so it finds a different (lower ID’d) entry that has the same url_title but in a completely unrelated channel.
I don’t want to have to hard code a root_node_entry_id into the templates, also I don’t want to have to retrieve the root_node_entry_id via a channel:entries call on child pages as it’s an undesired overhead.
Can you please advise.
Thanks
Eric
Edit:
I’ve also noticed that the function above doesn’t even seem to take into account the site_id so I actually have about 6 entries with “research” as the url_title across a number of sites and channels.
|
|
|