If you want to exclude a category in the featured listing, then you can do that by adding a little addition to the loop in the index template for your featured listing.
By default your loop look like this:
{{if \count($articles)}}{{foreach $articles as $id => $record}}{template="entry" app="cms" location="database"group="jwse_standard_featured_listing"params="$record, $database"}{{endforeach}}{{endif}
This simply loop through your articles and then output them using the template listed in the group parameters.
To exclude a category we add a query to say that only categories not belonging to one or more categories should be displayed.
You will need to replace the ID with the ID you want to the actual ID you want to exclude.
This is not a perfect solution however because what this does are that it will not give the articles with the excluded ID a template, so it will just not show, but it will still be counted. This leaves gaps in your listings, so I will look at a better solution to get rid of that.
- Owner
comment_5891If you want to exclude a category in the featured listing, then you can do that by adding a little addition to the loop in the index template for your featured listing.
By default your loop look like this:
This simply loop through your articles and then output them using the template listed in the group parameters.
To exclude a category we add a query to say that only categories not belonging to one or more categories should be displayed.
You will need to replace the ID with the ID you want to the actual ID you want to exclude.
This is not a perfect solution however because what this does are that it will not give the articles with the excluded ID a template, so it will just not show, but it will still be counted. This leaves gaps in your listings, so I will look at a better solution to get rid of that.
View full record
Link to comment
https://beta.jimiwikman.se/forums/topic/5606-exclude-a-category/Share on other sites