All extensions are free now. Because it was coded by Russians.

[AGS] Restrict Tag selection to parent

Please Log in or Create an account to join the conversation.

#
Hello,

In Article Good Search when I create a tag filter it shows all the tags I have, it does not matter from which parent it is.

I have different tags in different tag parents but when I create a module I just want to show the related tags from a specific parent.

Is there a way to only show the tags from a parent tag or a way to select a specific parent tag?

Regards,
Fabio

Please Log in or Create an account to join the conversation.

#
Hello, Fabio.

Currently, you can restrict a tags list based on category restriction only.

But, you can do that with file modification.

In mod_articles_good_search\helper.php

Find this line:
DISTINCT(t.id), t.title

And replace with the following:
$query = "DISTINCT(t.id), t.title, t.parent_id";

In the template file - fields\basic\tag.php

Replace this line:
<?php foreach($tags as $tag) { ?>

With the following:
<?php foreach($tags as $tag) { 
	if($tag->parent_id != '4') continue; // replace with your parent tag id
?>

Please Log in or Create an account to join the conversation.

#
Thanks, Andrey that was a quick response.

Currently, you can restrict a tags list based on category restriction only.


I was restricting based on the category, but now I have other modules and wanted to show only the relevant tag list.

But, you can do that with file modification.


It worked. Thanks for the great work.

Regards,
Fabio