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.
{{if \count($articles)}} {{foreach $articles as $id => $record}} {{if $record->container()->_id != '74'}} {template="entry" app="cms" location="database" group="jwse_standard_featured_listing" params="$record, $database"} {{endif}} {{endforeach}} {{endif}}
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.
Recommended Comments
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now