Copied to clipboard

Flag this post as spam?

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


  • DIDU 5 posts 95 karma points
    Aug 30, 2016 @ 11:38
    DIDU
    0

    Don't show footer other page, only Homepage

    After update for Footer , just only Homepage show right ! Other page miss some function enter image description here

    Homepage : enter image description here

  • Dennis Adolfi 1082 posts 6449 karma points MVP 6x c-trib
    Aug 30, 2016 @ 12:18
    Dennis Adolfi
    0

    Hi DIDU.

    If i understand you correctly, you have a problem that if you view the homepage, the footer navigation is working perfect. But when you visit any other page, the footer navigation is empty. Is that correct?

    It sounds like your footer navigation is listing the CurrentPage.Children, and not the CurrentPage.Site().Children, thats why it looks good on the homepage, but not on the other pages.

    Could you post your html code for the Footer?

  • DIDU 5 posts 95 karma points
    Aug 31, 2016 @ 02:10
    DIDU
    0

    Yes, my problem is exactly that. Help me, bro

    Code for footer : Navigation: enter image description here

    P : enter image description here

  • Dennis Adolfi 1082 posts 6449 karma points MVP 6x c-trib
    Aug 31, 2016 @ 06:25
    Dennis Adolfi
    0

    Hi again.

    Im afraid i cant really see how you populate the Model.FooterMenu list object, is that done in the back-end? In that case can you paste the back-end code for rendering your footer?

  • Dan Diplo 1554 posts 6205 karma points MVP 6x c-trib
    Aug 31, 2016 @ 08:27
    Dan Diplo
    1

    You want to access your properties recursively, so pass "true" to the GetPropertyValue<T> overload when accessing a property. This will check all the way back down the ancestors for a value.

    var phoneNumber = Model.Content.GetPropertyValue<string>("phoneNumber", true);
    

    I'm not sure how your Helper class works, but that is how you access the underlying values recursively.

  • DIDU 5 posts 95 karma points
    Sep 01, 2016 @ 02:07
    DIDU
    100

    Hey bros, After I added fuction :

            IPublishedContent rootContent;
            if(content.DocumentTypeAlias.Equals("homepage", StringComparison.OrdinalIgnoreCase))
            {
                rootContent = content;
            }
            else
            {
                rootContent = content.Ancestor(1);
            }
    

    My problem is solved , thanks your support bros

Please Sign in or register to post replies

Write your reply to:

Draft