Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Corey Toolis 12 posts 32 karma points
    May 07, 2014 @ 18:28
    Corey Toolis
    0

    Hiding Macro if certain template page is hidden

     <div id="SearchForm1" class="unit size1of3" style="position: relative;">
                                <div id="SearchFormBox">
                                      <img src="/media/14608/ribbon-startnow.png" style="position: absolute;left:208px;top:-4px;z-index:300;width:87px;">
                                      <umbraco:Macro PropDefaultState='[$selectedState]' Alias="CoreSiteSearchBox" runat="server"></umbraco:Macro>
                                </div>
                           </div>

    I have this in one of my templates on the home page of the template. I need to somehow make this not show when another page is hidden.


    Is there a way to do this? 


  • Jan Skovgaard 11280 posts 23678 karma points MVP 10x admin c-trib
    May 07, 2014 @ 22:15
    Jan Skovgaard
    0

    Hi Corey

    What version of Umbraco are you using?

    I think you should somehow be able to use either an XPATH or lookup a page based on an ID an figure out if it's marked as hidden or not.

    /Jan

  • Corey Toolis 12 posts 32 karma points
    May 08, 2014 @ 21:14
    Corey Toolis
    0

    I am using 4.7 

    and I am not familiar with XPATH could you help me out?

    Thanks, 

  • Jan Skovgaard 11280 posts 23678 karma points MVP 10x admin c-trib
    May 08, 2014 @ 21:17
    Jan Skovgaard
    0

    Hi Corey

    Ok, and are you using XSLT to render your pages or are you using razor?

    XPATH is a query language for XML to find specific XML nodes.

    Looking forward to hearing from you.

    /Jan

Please Sign in or register to post replies

Write your reply to:

Draft