Copied to clipboard

Flag this post as spam?

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


  • jeff mayer 122 posts 200 karma points
    Apr 28, 2014 @ 16:32
  • Jeavon Leopold 3072 posts 13628 karma points MVP 10x admin c-trib
    Apr 28, 2014 @ 17:23
    Jeavon Leopold
    100

    For v7.1+ you should use the samples here instead

  • jeff mayer 122 posts 200 karma points
    May 02, 2014 @ 18:04
    jeff mayer
    0

    thank you

  • mukund rayate 22 posts 172 karma points
    May 26, 2016 @ 09:25
    mukund rayate
    0

    Hi jeavon, what about partial view ? can we use same code in Umbraco.Web.Macros.PartialViewMacroPage file or some thing else need to workout?

  • Jeavon Leopold 3072 posts 13628 karma points MVP 10x admin c-trib
    May 26, 2016 @ 09:29
    Jeavon Leopold
    0

    The same code will be fine

  • mukund rayate 22 posts 172 karma points
    May 26, 2016 @ 09:32
    mukund rayate
    0

    but i didn't get selected value correct, every time i get same result as true.

    for ref- here is my code

    @inherits Umbraco.Web.Macros.PartialViewMacroPage 
    
    @{ var home = @Umbraco.TypedContentAtRoot(); string  mediaIds = ""; var GalID = CurrentPage.TopBannerID; var Seektime=0;var Isautoplay=false;var IsActive = true; var strIsautoplay = "";}
    
    
    
    @foreach (var childPage in home)
    {
        if (childPage.DocumentTypeAlias == "gallerys")
        {
            foreach (var childsubPage in childPage.Children)
            {
                if (childsubPage.DocumentTypeAlias == "gallery")
                {
                    if (childsubPage.Id == GalID)
                    {
                        if (childsubPage.GetPropertyValue<Boolean>("active"))
                        {
                            mediaIds = childsubPage.GetPropertyValue<string>("selectimages");
                            Seektime = childsubPage.GetPropertyValue<Int32>("Seektime");
                            Isautoplay = childsubPage.GetPropertyValue<Boolean>("AutoPlay");
                            break;
                        }
                        else
                        {
                            IsActive = false;
                        }
                    }                
                }
            }       
        }
    }
    

    check for

    if (childsubPage.GetPropertyValue<Boolean>("active"))
    

    this line

  • mukund rayate 22 posts 172 karma points
    May 26, 2016 @ 10:55
    mukund rayate
    0

    Got solution form Dannis

    Please follow below link

    Solution

Please Sign in or register to post replies

Write your reply to:

Draft