Copied to clipboard

Flag this post as spam?

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


  • Kevin 15 posts 146 karma points
    Apr 13, 2016 @ 13:47
    Kevin
    0

    Creating a Dynamic Footer?

    How would I create a dynamic footer which shows in every page, but can easily be adjusted by other users?

  • Steve Morgan 1348 posts 4457 karma points c-trib
    Apr 14, 2016 @ 07:31
    Steve Morgan
    0

    Hi,

    I would usually create a special "SiteSettings" node and create tabs for the header, footer etc etc content that is site wide (some people like to put this content at the home node level but I think this is confusing for editors).

    Then in your master template get your siteSettings node by ID (you can find the ID from the Properties tab). Do you have a "master" (site wide) template as per the tutorial https://our.umbraco.org/documentation/Tutorials/Creating-Basic-Site/Creating-Master-Template-Part-1 ?

    You can also find this node by razor searching methods but for a site settings node which doesn't change then I'd hardcode it for speed.

    @{
    Layout = null;
    var siteSettingsNode = Umbraco.TypedContent(4053);
    }
    

    Then in your footer you can do something like (note mine has a dynamic year)

    <footer>
        <span class="copyright">Copyright &copy; @(DateTime.Now.Year.ToString()) @siteSettingsNode.GetPropertyValue<string>("footerCopyright")</span>
    </footer>
    

    Hopefully you can see how to use that siteSettingsNodes to output your footer links or other content as required.

    HTH

    Steve

  • Kevin 15 posts 146 karma points
    Apr 14, 2016 @ 11:50
    Kevin
    0

    Hello Steve,

    Thank you for replying to my question. However, I have a footer with multiple columns, how could I do this?

  • Steve Morgan 1348 posts 4457 karma points c-trib
    Apr 14, 2016 @ 13:41
    Steve Morgan
    0

    Not sure I understand what mean - you can do anything with the markup and create any number of document type properties.

    If you want a series of footer links in a column then there are a hundred ways of doing this. Have you got a screen shot of what you're trying to achieve?

  • Aristotelis Pitaridis 84 posts 402 karma points
    Apr 14, 2016 @ 12:03
    Aristotelis Pitaridis
    0

    An easy solution would be to add the dynamic contents in a dictionary. That way a backoffice user will be able to change the contents whenever a change is required.

  • Kevin 15 posts 146 karma points
    Apr 14, 2016 @ 13:13
    Kevin
    0

    How would that work?

  • Nicholas Westby 2054 posts 7103 karma points c-trib
    Apr 14, 2016 @ 14:13
    Nicholas Westby
    0

    Depends on how exactly you want the user to be able to adjust the footer and how automated you want it to be. Have you heard of Archetype: https://our.umbraco.org/projects/backoffice-extensions/archetype/

    It's pretty great. I use it for most everything in Umbraco, including menus. If I were creating a footer menu that I planned to split into multiple, columns, I'd use an Archetype to define those columns.

    Also, I'd have nested Archetype fieldsets that allow me to pick the content nodes to appear within each column. You can do things like create multiple fieldsets so the users has control over how to pick nodes.

    For example, you could create a fieldset that allows a user to pick a node to serve as the ancestor node so all descendant nodes will automatically be added to that footer column. You might add a property to this fieldset to allow the user to exclude certain parts of the subtree of those descendants (e.g., maybe there are thousands of products and you don't want them all to show in the footer).

    You could create another fieldset that allows the user to explicitly pick content nodes to appear in the footer. The sky is really the limit when it comes to Archetype.

  • Kevin 15 posts 146 karma points
    Apr 14, 2016 @ 15:00
    Kevin
    0

    Hi Nicholas,

    Thank you for mentioning this plugin! I think I can make something out of it, however my footer is currently like this:

    How would I achieve this in Archetype? I am only wondering about the newsletter part though.

  • Nicholas Westby 2054 posts 7103 karma points c-trib
    Apr 14, 2016 @ 16:12
    Nicholas Westby
    100

    I actually did very similar here: https://www.oneoc.org/

    Footer

    Each column is a different type of Archetype fieldset. IIRC, they were: blog list, image, rich text, button.

    For yours, you'd probably want to go with: link list column, newsletter column.

    Archetype allows you to mix different types of fieldsets in one list.

  • Kevin 15 posts 146 karma points
    Apr 15, 2016 @ 07:05
    Kevin
    1

    Where/how can I use the link list?

    Edit:

    Made it like this

    enter image description here

    Thanks,

    Kevin

Please Sign in or register to post replies

Write your reply to:

Draft