I have a bunch of weblogs, each with its category group. I’m using all category related entries as navigation on a single entry page but on one template.
Level 1 (Navigation through whole site)
———————-
Weblog 1
- Category 1
- Category 2
- Category 3
Weblog 2
- Category 4
- Category 5
- Category 6
Level 2 (Single entry page navigation)
———————-
Weblog 1
- Category 1
* Entry 1
* Entry 2
* Entry 3
* ...
I first tried related_categories_mode=“on” but that was useless since it does not show current entry.
I do have a working solution now (see below) but I would like to know if there is any other way (I’m sure it is) to show all category entries on a single entry page? Perhaps some plugin that would get?
<div class="itemNav">
<ul>
{exp:query sql="SELECT url_title, title
FROM exp_category_posts
JOIN exp_weblog_titles ON exp_weblog_titles.entry_id = exp_category_posts.entry_id
WHERE cat_id = (
SELECT cat_id
FROM exp_category_posts
JOIN exp_weblog_titles ON exp_weblog_titles.entry_id = exp_category_posts.entry_id
WHERE exp_weblog_titles.url_title = '{segment_3}'
LIMIT 1 )
ORDER BY entry_date
LIMIT 0 , 30"}
<li><a href="http://{homepage}/{template_group}/prikaz/{url_title}">{title}</a></li>
{/exp:query}
</ul>
</div><!--itemNav-->