Search
Other Articles Anywhere questions
Forum

Only if parent category="Investigations&​quot;

Stephan Herby's Avatar Stephan Herby
Hi Petere,
I'm trying to get a list of article only if the present article is from Parent category "Investigation".
I have tried something like (actually I made a ot of differents try 🙂 ) :
{articles category="Investigation" include-child-categories="this:category"}
	{if first}
	<ul class="uk-list uk-list-divider uk-margin-remove-vertical sh-enquete-liste-in-article-ul">
	{/if}
	<li class="">
		<div class="uk-panel sh-investigation-titre">
			<div class="uk-margin-remove-last-child">[title]</div>
		</div>
	</li>
	{if last}
	</ul>
	{/if}
{/articles}
But it is not working (It was just a try, huh ? 🙂 )
Any advice about that ? Maybe I should try another way ?
Peter van Westen's Avatar Peter van Westen ADMIN
The include-child-categories attribute is a true/false toggle to tell it to include articles in categories that are children of the category "Investigation".

In your question, what do you mean with "present article"?

If you want to get all articles that have just "Investigation" as the category (and not child-categories of "Investigation"), then do:
{articles category="Investigation" include-child-categories="false"}
Please post a rating at the Joomla! Extensions Directory
Stephan Herby's Avatar Stephan Herby
Hi Peter, thank you for your feedback...
Actually what I mean is :
The list is show in a article only if this article (what i called "current article") is from a category who's parent is "Investigation".
But I found a solution :
Doing a custom Module, paste code Articles Anywhere in this module and use your "Advanced Module Manager" to tell the module show only in articles from "Investigation" Child only.
Works...

Maybe there's a better solution with Articles Anywhere structure ?
Peter van Westen's Avatar Peter van Westen ADMIN
Use Articles Anywhere:
{article}{if category="Investigation"}
{articles category="Investigation"}
 ...
{/articles}
{/if}{/article}

Or use Conditional Content:
{show category="Investigation"}
{articles category="Investigation"}
 ...
{/articles}
{/show}

Or use Conditional Content and Snippets:
{show category="Investigation"}
{snippet alias="article-title-list" category="Investigation"}
{/show}

Or whatever combination and setup you want.
Please post a rating at the Joomla! Extensions Directory
You can only post on the extension support forum if you have an active subscription and you log in

Buy a Pro subscription