Hide a slider in pages

Monjoie Dominique asked on July 26, 2018 11:47

Hello,

I created a slider in my master page. This page is redirected to first child (home page). How can I hide this slider in all my other pages. I just like to see it at the top of my home page.

Thanks for any help.

Correct Answer

Dragoljub Ilic answered on July 26, 2018 12:16

Hi Monjoie,

There is several ways how you can do that:

  1. If design allows you, you should move that slider to the home page, because it's related only for home page.
  2. If you have separate page type for home page, you can add your page type in 'Show for page types' field on web part, in Visibility section.
  3. You can hardcode url for home page in web part on master page. Open webpart and click on small arrow near to the visible checkbox and put macro like this {% CurrentDocument.NodeAliasPath == "/home" |(identity)GlobalAdministrator%}. To avoid hardcoding, you can check url from setting 'Settings.CMSDefaultAliasPath' because usually default alias path for site is homepage, but you must verify it in your environment.

Best regards, Dragoljub

0 votesVote for this answer Unmark Correct answer

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