I have a blog that is set up to show category archives using urls like this:
example.com/directory/category/CATEGORY_NAME
This part works fine.
For each category page, I have a corresponding channel entry where the entry’s url_title is the same as the category name.
For example, at this url: example.com/directory/category/cats, i would need to load the entry “cats” from my pages channel, and then display all entries from the “cats” category below it.
I’m having trouble getting the channel entry to load, because EE/Structure expect the entry to be at example.com/directory/cats, but triggers is making EE interpret the URL as just example.com/directory.
This is my channel entries tag:
{exp:channel:entries channel=“pages” limit=“1” disable=“categories|category_fields|member_data|pagination” require_entry=“yes” }
I know I can add dynamic=“off” and url_title=”{triggers:last_segment}” to get it to display, but I am reusing the same template code for other non-category pages, so I need the channel entries tag to be dynamic. Is there any other way to make EE get the proper channel entry?
|