Copied to clipboard

Flag this post as spam?

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


  • Sushma 12 posts 32 karma points
    Nov 06, 2012 @ 12:03
    Sushma
    0

    Show asp adrotator in specific pages

    Hi,

    I want to show asp adrotator control only in few pages. So i placed a checkbox, the page which has the property checked should show adrotator and the other pages should not show the adrotator.

    @if(Model.showadrotator != false)
    {
    <umbraco:Macro Alias="CPCD-AdRotator" runat="server"></umbraco:Macro>
    }

    The above code throws me an error..

    Can anyone suggest me few ideas to implement?

    can we implement the same using jquery or something???

     

    Thanks

    Sushma

  • Mike Chambers 621 posts 1203 karma points c-trib
    Nov 06, 2012 @ 12:08
    Mike Chambers
    0

    Move your login for showadrotator inside the CPCD-AdRotator macro...

    if it's razor macro then easy, same code

    if xslt, then......

    if user control then 

    CurrentNode = umbraco.NodeFactory.Node.GetCurrent();

                if (CurrentNode.GetProperty("showadrotator").Value == "1")

                { ....}

  • Sushma 12 posts 32 karma points
    Nov 06, 2012 @ 14:25
    Sushma
    0

    Thankyou.. it worked..

  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies