You may want to display only specific content items on a page or a visualizer. You can achieve this with the help of a native filter of DNN that uses tags in the URL as a means of filtering.
- Version Evoq 9+
- In the Persona Bar, select Content and then choose Content Library.
- A list of your site's content items will display. Navigate to the content item that you want to tag for filtering and click the corresponding Edit icon.
NOTE: The Edit icon appears as a gray pencil.
- Select the Properties tab and include your tag(s) in the Tags field and click the Save button when finished.
NOTE: Regarding how you could add tags, consider this example: You want to include a certain tag only to content that was created in the year 2019. You could add "2019content" as a tag to all items that were created in the year 2019.
If you have many entries, you can use the API for this.
You can use the filter string by appending the following ?filter=tag1,tag2. For example, you can put the URL like https://test.dnndev.me/testpage?filter=tag1,tag2 (URL for reference only). In this scenario, it will only filter out content items that have the tags "tag1" and "tag2".
From the example above, it will filter content items with tags "tag1" and "tag2". It cannot filter "OR" wherein it either filters either "tag1" or "tag2".
You should now be able to add to the URL where your visualizer is
?filter= followed by the tag to only display tagged content. For example, yoursite.com/?filter=2019content will only show items with the "2019content" tag.