Copied to clipboard

Flag this post as spam?

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


  • robert coyle 14 posts 34 karma points
    Sep 03, 2010 @ 21:09
    robert coyle
    0

    document types, datatypes and how to relate to a modular page

    Hi Guys,
    Im coming from Joomla and trying to get my head around Umbraco. Ive gotten to grips with Templates and Menus. Now im trying to figure out how to add widgets to my pages. Whats a widget? A widget might be something I add to the left or right navigation of my subpages (a promotion, a dropdown, a calendar). My page banner would be  widget. In fact my entire front page would be made up of widgets... most of them just plain HTML.

    What im asking is how to you build up a page in a modular fashion like in the example site below. I have put a pink border around the "modules" that makes up this front page.

    I have looked into the answer to this questions and my search took me to Document Types and Data Types... but I dont think I fully understood the idea. Nevertheless let me attempt to explain how I think it works and im hoping someone can correct me :)

    My understanding

    You start off in Umbraco by creating your main templates and menus. However from here you still cannot create a page. You need to define a basic document type that slots into one of these templates. For example for a basic text page you not only need a template for this page but you also need a document type defined. Its within the document type that you add the widget for the text editor for this basic page. This is called a Data Type. 

    If I want to create a modular front page like in the example below I create first a template with the layout defined. Then I create a document type for the front page. In this I create a number of "tabs" or "datatypes" (whats the difference?) to represent each of the modules below. I guess I just need a plain html tabs/datatypes? If im correct so far then what I dont get now is how do I order these datatypes in my page? Do I add them to the template(which contains layouts) using one of those funky umbraco calls like:
    <umbraco:Item runat="server" field="siteDescription" recursive="true" />

    THANKS WHERE IM AT in my understanding. I was hoping someone could let me know if im "way off" just a little off :)

    Thanks for your help community :) Rob

    I

     

  • Rich Green 2246 posts 4008 karma points
    Sep 03, 2010 @ 22:38
    Rich Green
    0

    Hi Rob,

    I implement what your asking for on pretty much every Umbraco site I build.

    Hendy explains all about how to do this on his blog http://blog.hendyracher.co.uk/sidebar-widgets-with-umbraco-v4/ 

    Though he uses an ultimate picker to select the modules, I would use the new Multi-node tree picker which allows you to sort the modules for each page.

    I don't know if Hendy mentions it on his page but I always allow the modules to be set per page but if nothing is set for a page the page will use the modules from higher up the structure, this saves your client selecting modules on every single page.

    If you using Umbraco 4.5 and upwards I believe you can use the new Macro container to deal with modules, however I don't have any experience using this.

    Best of luck

    Rich


  • robert coyle 14 posts 34 karma points
    Sep 05, 2010 @ 20:22
    robert coyle
    0

    Hi Richard,
    Thanks a lot for your reply! Ive been working away and have gotten my head around things somewhat. I have now confirmed that what I call Modules (sections of a page) are in Umbraco Properties(Data Types) of a Doc Type. And these Properties(Data Types) are layed out by me manually (via html css) in my templates! Thats grand and that should be all I need for my front page.

    However for my subpages I might need modules that can be shared accross a number of pages but only updated in one place. This wouldnt work with normal poperties as youd need to add the module(piece of html) to each and every page. So this is where your suggestion comes in! If I create my module as an item in the content tree I can then pull it into my Doc Type using a Data Type like ultimate picker and set it to the pages I want! Ok im going to play with that :)

    Thanks Rich

Please Sign in or register to post replies

Write your reply to:

Draft