Tag Cloud - Hide container on subpages

David Pearson asked on January 26, 2015 16:24

I am trying to hide the Tag cloud on the detail page of News. I have a two column template with the news layout in the left column and the tag cloud in the right column for the list page. I would like to show a different web part for the right column when viewing the detail page. Currently the Tag Cloud shows up on both the detail and list page.

I have "Hide container on subpages" checked.

Am I misunderstanding this option?

David

Recent Answers


Brenden Kehren answered on January 26, 2015 17:43 (last edited on December 10, 2019 02:30)

Hide on sub pages means just that. You have to have a parent/child relationship to the current node/page. If there isn't one and you are simply looking at a querystring then there's a good chance you're not navigating down a node.

A good example of hide on sub pages would be a news list and a detail page. On the news list template you have a repeater that displays a summary of all the news items. In that same repeater, you set the selected transformation and when the viewer clicks on the link to see more, they are navigating to a sub page using the same template (this can also be done with nested templates).

Another example would be a listing of blog posts and the actual blog post.

www.domain.com/blog (parent) www.domain.com/blog/june-2014/blog-post (child)

Here are some examples that are not nested or parent/child

www.domain.com/blog?tag=crazy%20kids

You'd have to set your visibility based on a querystring. So your visibility macro could look something like

{% QueryString.GetValue("tag", "") == "" |(identity)GlobalAdministrator%}
1 votesVote for this answer Mark as a Correct answer

   Please, sign in to be able to submit a new answer.