Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
  • 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.


    User Feedback

    Recommended Comments

    There are no comments to display.



    Create an account or sign in to comment

    You need to be a member in order to leave a comment

    Create an account

    Sign up for a new account in our community. It's easy!

    Register a new account

    Sign in

    Already have an account? Sign in here.

    Sign In Now

×
×
  • Create New...