Web Part Zone Visibility Settings

Katrina Miday asked on October 28, 2015 20:38

Hello!

I have a web part zone setup on my page that holds an article filter, a basic repeater and a universal pager. I'm currently using a macro within the webpart zone visibility settings to hide it if there are no child pages.

The repeater within the web part zone is setup only to display child articles, this is functioning correctly to hide if empty, but the web part zone is still appearing because there are other types of child pages. How would I pass the "show if only child articles" functionality to the web part zone?

Correct Answer

Brenden Kehren answered on October 29, 2015 13:25

Check out this post. It has what you're looking for.

0 votesVote for this answer Unmark Correct answer

Recent Answers


Brenden Kehren answered on October 29, 2015 01:09

I'd take the macro out of the repeater and place it in your webpart zone. Should work the same.

1 votesVote for this answer Mark as a Correct answer

Katrina Miday answered on October 29, 2015 11:57 (last edited on December 10, 2019 02:30)

Hi Brenden, I do have the macro in the webpart zone. It's currently using {% if(CurrentDocument.Children.Count>0){true}else{false} |(identity)GlobalAdministrator%} which works great for show/hide for all child documents.

The only catch is that it's counting all child pages no matter the type. I'd like it to work only if a specific child page type exists.

Does that make sense? It makes sense in my head, but translating the idea into words isn't working today.

Thanks!

0 votesVote for this answer Mark as a Correct answer

Katrina Miday answered on October 29, 2015 13:57

Exactly what I was looking for, thank you!

0 votesVote for this answer Mark as a Correct answer

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