Copied to clipboard

Flag this post as spam?

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


  • Elliot Orsborn 4 posts 84 karma points
    Mar 01, 2019 @ 14:43
    Elliot Orsborn
    0

    Hi,

    I've been tasked by my work to build a CMS using Umbraco, but I'm stuck. I would like to use variables which can be updated within the CMS, more specifically, I'm looking to build a monthly fee variable.

    Let's say we have a monthly fee variable of say, £10. I would be looking to use this variable on as many pages as I want. However, if that monthly fee were to change to £15 in a year's time I would like to change it just once and thereby updating all instances where the variable is being used (instead of changing every single instance manually).

    My question is simply, how do I achieve this? Should I be looking at using the Dictionary/Macro plugins? Or something else entirely? Is this even possible?

    Help would be greatly appreciated!

    Cheers.

  • Nik 1599 posts 7179 karma points MVP 6x c-trib
    Mar 01, 2019 @ 14:51
    Nik
    1

    Hi Elliot,

    I guess it depends on your use case, but there are a few approaches you can take that depend a bit on how you are building your sites.

    For example, you could have a settings tab on your home node that stores site wide settings.

    Alternatively, you could have a structure where your root node is purely site settings, and your home node is a page beneath this point.

    Another option is storing this sort of value in Web Config (although it's harder to edit this via the CMS as it would cause the site to restart.

    Finally, a 4th option is to use a custom database table to store this sort of value in and have a custom Umbraco section/dashboard to manage these site settings.

    That's just a couple of options off of the top of my head :-)

    Nik

  • Elliot Orsborn 4 posts 84 karma points
    Mar 01, 2019 @ 15:51
    Elliot Orsborn
    0

    Thanks for the swift reply! I'll give these a go when I'm back at work on Monday. Much appreciated :)

Please Sign in or register to post replies

Write your reply to:

Draft