Copied to clipboard

Flag this post as spam?

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


  • Dennis Morgan 11 posts 10 karma points
    Jun 25, 2009 @ 00:58
    Dennis Morgan
    0

    Putting functionality in umbraco admin vs macro

    I have just started to develop with umbraco. The initial impression I get is it seems fairly easy to customize using macros on the front end (the actual website). If you want to have something like an admin though, I would think you would want to keep it within the umbraco admin itself. There doesn't seem to be a lot of information on extending the umbraco admin.

    For example, if I wanted to have a centralized place where someone could set up promotion codes that would be used in the front end I would think I could have a promocode documentype which could associate a promocode with a page. But if I want to have a list of promocodes with expiration dates, etc that are editable within an admin type page, do people normally break it out of the admin and into a macro on the website itself? Or do you normally  create another "Section" for this type of thing within the umbraco admin? What I was thinking of was something like an admin Section with the nodes of  it's tree pointing to different admin pages, each with it's own purpose.

    Maybe I am thinking of this the wrong way but it seems strange that you would have two seperate admins. The umbraco admin and one in the website itself.  Thanks for any suggestions.

  • Nico Lubbers 151 posts 175 karma points
    Jun 29, 2009 @ 00:30
    Nico Lubbers
    1

    Hi Dennis,

    One approach is to keep a seperate folder in the Content-section for storing the promocodes. See structure below.

    Content
        Website (home)
            page 1
            page N
        Data
             Promocodes
                 code 1
                 code N

    I think you could use a datatype like contentpicker to refer from page1 to code N etc..

    Nico

  • Jesper Ordrup 1019 posts 1528 karma points MVP
    Jun 29, 2009 @ 09:03
    Jesper Ordrup
    0

    Hi Dennis,

    In your case it sounds like one of the many things a webmaster would take care of and not a feature on your website that you want to expose to extranet ppl. The great thing though is that you have the possiblity to implement it in both ways but in this case I would do it in Umbraco admin.

    Either as Nico suggests - use a seperate folder for configuration/building blocks that you can pick with "Ultimate contentpicker" or "related nodes (build in)". Or maybe even http://dl.jesper.com/start-page/contentdropdown.aspx .. or build your own.

    Finally - you could add another section (like content/media/settings) if your needs where bigger.

    /Jesper

  • Shannon Deminick 1526 posts 5272 karma points MVP 3x
    Jun 29, 2009 @ 10:52
    Shannon Deminick
    1

    Agreed, the most simple approach would be to have a different folder stucture in your content tree, however if you want to store your promo codes in a custom database, or you plan on having each promo code as a node itself, this might be too much data to store in Umbraco.

    To extend the Umbraco admin, you can create your own custom tree by inheriting from BaseTree, then you'll need to modify two tables: umbracoApp and umbracoAppTable to add your tree to an existing section, or creating your own.

    Examples of BaseTree can be found in the Umbraco source if you download it from CodePlex... The files are under /umbraco/presentation/Trees

     

Please Sign in or register to post replies

Write your reply to:

Draft