Skip to content
View in the app

A better way to browse. Learn more.

JimiWikman.se

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Exclude a category

  • Owner

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.


View full record

  • Views 1.3k
  • Created
  • Last Reply

Featured Replies

No posts to show

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.