Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
  • IPS Customization.

    While building this website I have learned a lot about how to customiza different aspects of the IPS products. I see a lot of people struggling to get started with IPS and this section is my attempt to gather what I have learned so others can benefit as well.

    To me nothing is more important than to share knowledge and help others. This section contain my findings and the things I have learned, but I still have much more to learn as well. Together we can learn and evolve the ways we customize the IPS products and while doing that there are no stupid questions. In the forum you can ask any question and we will try our best to answer them.

    Go to the IPS Forum ->
  • Exclude a category


    Jimi Wikman
     Share

    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.

     Share


    User Feedback

    Recommended Comments

    There are no comments to display.



    Please sign in to comment

    You will be able to leave a comment after signing in



    Sign In Now

×
×
  • Create New...