Copied to clipboard

Flag this post as spam?

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


  • navid 9 posts 88 karma points
    Apr 12, 2017 @ 06:26
    navid
    0

    how to creating a modular page in umbraco?

    I am using umbraco v7 for my site and i want to create a modular page in it. I am looking for a way to make my site page in a modular way as i describe below:

    1. I create my modules as partial macro
    2. in my page mainContent property which is a RTE type i create a bootstrap grid system.
    3. finally add my macros to the cell of grid an then my page is easily created and site admin can create his/her layout dynamically.

    is there any way to achieve this goal in umbraco?

  • Dennis Adolfi 1082 posts 6446 karma points MVP 5x c-trib
    Apr 14, 2017 @ 07:55
    Dennis Adolfi
    1

    Hi navid.

    Have you had a look at The Grid? It sounds pretty much as what you are requesting. You can import macros in grid cells.

    Here is some documentation:

    https://youtu.be/LlI13fxbW-k

    https://our.umbraco.org/documentation/getting-started/backoffice/property-editors/built-in-property-editors/grid-layout

    http://sinfomania.com/tutorials/umbraco-7x/developer/grid-layout-quick-and-easy/

    Another alternative to a modular site setup is having a look at Nested Content or Archetype.

    Best of luck to you!

  • navid 9 posts 88 karma points
    Apr 15, 2017 @ 08:55
    navid
    0

    thank you dennis for your response and help. yes i know about grid layout but my problem is adding more grid inside grids.

    for example i want to create a module like "article card detail" then add three of them to a row and create some some thing like this: enter image description here

    and then use a predefined slider macro to create an image slider below of some text.

    in some complicate case i want to create a sublayout like this: enter image description here
    in this case i need create an extra row in middle column and add two column in each of them. then i add my widget or macro inside each cell.

    in other hand main dis advantage of grid layout is problem in accessing data which written inside it.

  • Rune Hem Strand 147 posts 911 karma points hq c-trib
    Apr 15, 2017 @ 12:01
    Rune Hem Strand
    2

    If you are "just" inserting macros this is easily achievable with Grid Layouts:

    enter image description here

  • Nicholas Westby 2054 posts 7100 karma points c-trib
    Apr 14, 2017 @ 15:20
  • navid 9 posts 88 karma points
    Apr 15, 2017 @ 08:29
    navid
    0

    this article was good and use full but can you tell me some more technical detail such as manner of creating widget (UI and rendering theme in side view)? how can i add widget dynamically to my page?

  • Nicholas Westby 2054 posts 7100 karma points c-trib
    Apr 15, 2017 @ 08:39
    Nicholas Westby
    100

    I recommend installing Archetype and tinkering. Basically, when you create a new data type based on the Archetype property editor, you will configure the data type. When configuring it, you add a number of "fieldsets". I use these fieldsets as widgets. Each fieldset can have a number of properties. Those properties can in turn use other Archetype data types, which means that Archetype can be used to create very nested data structures.

    Once you have configured the Archetype, you add it as a property to a document type, then you can add content to your page with the interface that Archetype provides. It basically allows you to add a bunch of fieldsets (aka, widgets). A coworker of mine created an Umbraco plugin, ContentTemplates, that allows you to specify a default set of widgets to be added to newly created pages (that makes it a bit easier on content editors so they don't have to know which widgets are appropriate for each page).

    You can render it however you choose to. You basically get a list of widgets as data. I typically convert that to JSON then pass it to Angular so it can be rendered with Angular directives. However, if you are not using Angular, you could instead pass the data to CSHTML partial views. If you want to automate things a bit, you could create the CSHTML partial view so they match the name of the fieldset aliases (e.g., "slideshow", "calloutGrid", and so on).

    Archetype doesn't enforce any particular rendering strategy. That's entirely up to you.

    Here is some Archetype documentation: https://github.com/kgiszewski/ArchetypeManual

Please Sign in or register to post replies

Write your reply to:

Draft