Copied to clipboard

Flag this post as spam?

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


  • Clickfarm 77 posts 161 karma points
    Jan 13, 2015 @ 17:05
    Clickfarm
    0

    Help setting up document type with optional modular sections

    Been working with umbraco for a couple weeks now and like what i see so far. Looking for advice on how to configure the following:

    I need to set up a document type that will allow for creating different types of modules/sections that can be added in any order as many times as the user wants to.

    For example, say I have the following sections of a page:

    1) text area with graphic
    2) image gallery
    3) video gallery

    I want to be able to allow the user to set up a page that could have any number of those items in any order.

    one page might be set up like:

    Page1
    1) text area with graphic
    2) text area with graphic
    3) video gallery
    4) video gallery

    while another page might be set up like:

    Page2
    1) video gallery
    2) image gallery
    3) text area with graphic

    Looking for any direction on the best way to configure a document type to allow for these "modular" sections.

    Thanks!

  • Jan Skovgaard 11280 posts 23678 karma points MVP 11x admin c-trib
    Jan 13, 2015 @ 17:13
    Jan Skovgaard
    0

    Hi Matt and welcome to our :)

    If you're using Umbraco 7.2 then you should take a closer look at the new grid editor, which shipped with this release of Umbraco.

    You can see a short demo of the grid editor in the release blog post here http://umbraco.com/follow-us/blog-archive/2014/12/4/umbraco-72-released/

    And you can read the documentation here http://our.umbraco.org/documentation/using-umbraco/backoffice-overview/property-editors/built-in-property-editors-v7/grid-layout and about best practice here http://our.umbraco.org/Documentation/Using-Umbraco/Backoffice-Overview/Property-Editors/Built-in-Property-Editors-v7/Grid-Layout-Best-Practices

    There is also a video from CodeGarden 14 where Niels and Per talks about how to think when using Umbraco 7, which might be beneficial as well http://stream.umbraco.org/video/9961032/thinking-in-seven

    And Antoine Giraud's article on the annual Umbraco advent calendar about macros in grid editors might also be of interest to you even though it's more advanced http://24days.in/umbraco/2014/grid-macros/

    Also there is an early demo video using the grid here https://www.youtube.com/watch?v=RxoOCfdqghY

    I hope this helps.

    /Jan

  • Brett Spencer 11 posts 31 karma points
    Jan 13, 2015 @ 17:24
    Brett Spencer
    0

    I have accomplished this simply by using partial view macros.

    Not sure if you're more developer or designer but I set up partials views that are called by a controller action. So the your content editor can place the macro in any of your pages that you allow.

    So for instance, you can give variables for the text and graphic to be passed to that macro for rendering on that specific page.

    Now I also have a video gallery and my code iterates through all videos... easy. What is not so easy is creating a relationship (or category) for each video. So if I have one service (or product, or page, or whatever) that uses 3 of 20 videos, how do I use a many to many relationship and only query the videos I need?

  • Brett Spencer 11 posts 31 karma points
    Jan 13, 2015 @ 17:32
    Brett Spencer
    0

    Jan, thank you for the detailed explanation of the video links. I have been reviewing these videos for the last two days and have yet to view the ones you recommend here... doing it now. Was also wondering if there was any documentation on the grid...

    Oh... I'm using 7.1.8... tried an upgrade and it YSOD like crazy.

    EDIT: I take it back, I have seen those videos but they only scratch the surface of possibility...

  • Clickfarm 77 posts 161 karma points
    Jan 13, 2015 @ 18:52
    Clickfarm
    0

    Thanks Jan, looks like using the Grid Layout might work for this.

    Question: How do I go about adding different editors other than the default ones available when customizing a row configuration? I need to be able to add an image gallery (maybe multiple media picker?) and video gallery. 

     

  • Clickfarm 77 posts 161 karma points
    Jan 13, 2015 @ 19:05
    Clickfarm
    0

    Sorry for the multiple posts... this site is having some serious issues with page load times at the moment.

  • Jan Skovgaard 11280 posts 23678 karma points MVP 11x admin c-trib
    Jan 13, 2015 @ 20:42
    Jan Skovgaard
    0

    Hi Matt

    You should be able to configure the grid editor (and create more instances of it with different configurations) in the "Developer" section under the "Datatypes" folder.

    To the right you can configure, which editors it should be possible to use in this instance of the grid editor. It can however be a bit confusing since you need to click somewhere in order to be able to select them. Sorry not at my Umbraco machine at the moment so can't post a screen dump.

    Does that make sense?

    @Brett - Yeah you're right but it might be a good starting point. Also make sure to read the documentation links if you have not done so already. And you of course need to be at 7.2 in order to be able to use the grid editor :) - If you're still having issues with upgrading your 7.1.8 instance then please create a seperate post with the issues you're encountering so this original subject is not hijacked.

    Cheers, Jan

  • Clickfarm 77 posts 161 karma points
    Jan 13, 2015 @ 20:49
    Clickfarm
    0

     

     Thanks for your help.

    What I mean is when you are editing a row configuration you can either "allow all editors" or pick from a finite list of editors. How do I add "image gallery" to the list of editors for one of the row configurations?

  • Jan Skovgaard 11280 posts 23678 karma points MVP 11x admin c-trib
    Jan 13, 2015 @ 21:00
    Jan Skovgaard
    0

    Hi Matt

    Ah, that can be defined in the /config/grid.editors.config.js

    See Runes answer in this post http://our.umbraco.org/forum/umbraco-7/using-umbraco-7/60368-Grid-Settings-PreValueEditors - Turns out that there has been made videos available on http://umbraco.tv about using the grid editor so it might be worth signing up and watch that video as well.

    Hope this helps.

    /Jan

Please Sign in or register to post replies

Write your reply to:

Draft