Copied to clipboard

Flag this post as spam?

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


  • raza 15 posts 115 karma points
    May 17, 2016 @ 00:35
    raza
    0

    Umbraco 7 Creating Reusable Data (not layout of such)

    I'm new to Umbraco (using latest version, which at this time is 7.4.3) and really don't have any experience with CMSs at all, for that matter. I'm needing to give content editors a way to create many "Reports" which consist of meta data about each (Date, Title, associated downloads) and then "Sections" of the "Report", which is basically a table of contents with associated content.

    • Reports

      • Report1

        • Title
        • Date
        • IsArchived

        • Sections

          • Section1
            • Title
            • Content .........

    ........... and so on........

    Each "Report" could take quite a bit of time to set up and each one's data will be reused on various web pages and in different display formats (such as list of reports vs. full report detail).

    Using Umbraco, what is the best approach for this? I'd like the content editors to be able to define the report data once and then pick that data to be displayed on various pages and in different ways.

    I've seen posts about using Archetype to create reusable "pickable widgets" (http://24days.in/umbraco/2015/umbraco-zeitgeist/#picked-widgets), but that seems kind of hacky and unintuitive for the editor users. Then I've seen mention of creating whole new custom sections of the BackOffice, which seems like overkill and possibly a hell of a lot of work and ramp up time to learn how to do so.

    Ideas?? TIA!

  • raza 15 posts 115 karma points
    May 18, 2016 @ 15:50
    raza
    0

    Anybody?? :)

  • Nicholas Westby 2054 posts 7103 karma points c-trib
    May 18, 2016 @ 16:26
    Nicholas Westby
    0

    Not sure I'd call pickable widgets hacky, but then I'm biased (as the author of that article) :-)

    In your case, if you aren't using Archetype already, it doesn't make sense to add it just to be able to reuse things. Instead, you can just use a multinode tree picker to pick your content nodes so they can be used again.

    If you want the items to be picked to be displayed inline (i.e., rather than showing the dialog that gets displayed by the multinode tree picker) and without the content tree hierarchy, you can use nuPickers (an Umbraco plugin).

  • raza 15 posts 115 karma points
    May 18, 2016 @ 21:28
    raza
    0

    Nicolas, maybe the word "hacky" wasn't appropriate here, so I do sincerely apologize. What I meant by this was, as a developer architect coming from a non-CMS development background, this approach seems non-traditional. This may be from my lack of experience with CMS systems as a whole as I've struggled to wrap my head around the concepts that come along with it.

    So, the concept of picked widgets would be your recommendation to implementing "define-data-once-reuse-multiple-areas"?

  • Nicholas Westby 2054 posts 7103 karma points c-trib
    May 18, 2016 @ 21:44
    Nicholas Westby
    100

    I wouldn't use the picked widgets approach I outlined in the article for your particular case, as that is specific to Archetype widgets. However, the concept is very similar to what I'd recommend you do.

    The nice thing about using a multinode treepicker (MNTP) is that you can specify a start node so that users don't have to drill down into too many nested nodes to find what they're after. Also, the MNTP allows you to whitelist the types of nodes the user can pick, which ensures they can't pick nodes that are inappropriate. If you select the "Show open button" option, it will even show a link that allows the user to navigate directly to the content node that has been selected. Here's an example configuration for a MNTP:

    MNTP

    That allows users to select articles. Note there is also a button to "Show edit button", so you might give that a try too.

    Alternatively, you can use nuPickers. That is nice because you can get rid of the hierarchy and display the nodes in whatever way you like: https://our.umbraco.org/projects/backoffice-extensions/nupickers/

    I haven't tried it, but Web Blocks may also be of interest for your use case (not that I'd recommend it, but worth a look): https://our.umbraco.org/projects/backoffice-extensions/mentor-web-blocks

  • raza 15 posts 115 karma points
    May 19, 2016 @ 18:10
    raza
    0

    Nicolas!! You're the man!

    What I did was actually combined the two approaches you mentioned because the "report" is a somewhat complex/hierarchical data structure in itself and needed to include some other custom data types.

    • I defined an Archetype that contains all the properties for gathering the pieces of data for a single "Report".

    archetype data type

    • I then created a doc type with no template or special properties called a "folder doc type". (just for organizational purposes) and another one called "report widget" that uses the Archetype as a property of it.

    • I created a content node of the folder doc type and under that, a content node of type report widget.

    enter image description here

    • Then I created a data type of MNTP and set it to start in the "folder" node and only allow report widget types.

    enter image description here

    • Then added that data type to a content page and was able to view/pick one or more report widget content instances. :)

    enter image description here

    Works great!!! And now that I have it in place, I think this flow will be pretty intuitive for the content editors.

    I am wondering about nuPickers though..... I'm running version 7.4.3 and I thought nuPickers wasn't up-to-date yet with this version. Am I mistaken about this?

    Also, I'm having a hard time finding good info/explanations on the Umbraco Grid and how to use it..... would you happen to know of a good resource for this?

    Thank you so much for the obvious effort in helping me with this. Your time is truly appreciated!! I'm trying to pay if forward with all my screenshots here. ;-)

  • Nicholas Westby 2054 posts 7103 karma points c-trib
    May 19, 2016 @ 18:30
    Nicholas Westby
    0

    Happy to help, and your thorough follow-up is appreciated :-)

    I thought nuPickers wasn't up-to-date yet with this version. Am I mistaken about this?

    nuPickers works on Umbraco 7.4.3. I'm currently using it on an Umbraco 7.4.3 website for a different purpose:

    Window Target

    You can start researching the Umbraco Grid Layout here: https://our.umbraco.org/documentation/getting-started/backoffice/property-editors/built-in-property-editors/grid-layout

    FYI, I'm not sure if the Grid works with Archetype, so keep that in mind.

  • raza 15 posts 115 karma points
    May 19, 2016 @ 19:10
    raza
    0

    Duly noted. ;-) Thanks again!

Please Sign in or register to post replies

Write your reply to:

Draft