Copied to clipboard

Flag this post as spam?

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


  • Rocoeh 65 posts 86 karma points
    Mar 16, 2012 @ 17:52
    Rocoeh
    0

    Blocks in Umbraco

    I ma moving over to Umbraco from a Drupal background but a few things I need to get me head around. In Drupal you have a concept of blocks which are editable chunks of html that you can click on and edit. How to I recreate this or what the the Umbraco equivalent and how would this be used? Also drawing from a drupal comparison, there is a thing called views which allows me to create lists of pages of type 'news'. For example a site I built has a 'latest news' listing on the homepage (http://klaklak.com) how would I recreate this in Umbraco. I suppose this concepts would best be described by someone who who has experience of both systems. There is a lot to learn so forgive the daft question.

  • Lachlann 344 posts 626 karma points
    Mar 16, 2012 @ 18:11
    Lachlann
    1

    Hi Rocoeh,

    Welcome to Umbraco!

    I used to work with a guy called Paul who came from a Drupal background and took to Umbraco very quickly his blog is here http://blue-and-orange.net/articles/umbraco/why-umbraco-rocks/ he may be a good contact for umbraco/Drupal comparison quesitons.

    regarding your editing question:

    There is a feature in umbraco called Canvas which I think sounds like to would best mirror the functionality you are looking for. I have never really dabbled in Canvas and I find the client I develop sites for find the standard umbraco metaphor of content editing very quick to pick up.

    I think it might be worth watching some of the videos at umbraco.tv

    Matt brailsford also wrote a great blog post which gives an overview of the Umbraco templating system http://blog.mattbrailsford.com/2011/04/07/anatomy-of-an-umbraco-document/

    I hope this helps / points you in the right direction

    Best

     

    L

     

  • Rocoeh 65 posts 86 karma points
    Mar 16, 2012 @ 18:31
    Rocoeh
    0

    Thanks for your prompt reply, I looked at canvas and it doesn't look to be an overly developed part of umbraco, which is fine, the live editing experience is not essential and you have got by without it so far.

    Will get a subscription to .tv and look at the blogs. I think blocks are done by creating doctypes but looking at the most efficient way to do it.

     

  • czy 12 posts 32 karma points
    Mar 19, 2012 @ 15:53
    czy
    0

    using xsl based macro will help you achieve " For example a site I built has a 'latest news' listing on the homepage "

    You can find the demo at

    http://umbracodemowebsite.codeplex.com/

    More specifically, please refer to the following file.

    http://umbracodemowebsite.codeplex.com/SourceControl/changeset/view/e864eef39611#xslt%2fDocumentationContent.xslt

     

  • Rocoeh 65 posts 86 karma points
    Mar 19, 2012 @ 16:58
    Rocoeh
    0

     

     

     

    Ok so I know what document types are and how they relate to templates, the main question is how I can create REUSABLE blocks of editable html (Block1, Block2, Block3) and place them in the page/content region of my choice?

     

    They way I would do this at the moment is

    - create a  document type (myhomepage)

    - create the tabs for the content. (maybe a tab per block)

    - build the template outputting the page

     

    This is fine but what if I want to use block2 on my about-us page?

  • Lachlann 344 posts 626 karma points
    Mar 19, 2012 @ 17:34
    Lachlann
    0

    Hey,

    the way I tend to do this is by creating a doc type called "Blocks folder" then another called "Block" the blocks folder will have allowed child nodes of 'block'. You then create all of  your blocks in a folder outside of the home node.

    You can then use something like the uComponents Multi node tree picker to add these blocks to each page.

    Does that make sense?

     

    L

  • Rocoeh 65 posts 86 karma points
    Mar 19, 2012 @ 17:52
    Rocoeh
    0

    Not really but wil give it a go and get back.....

  • Rocoeh 65 posts 86 karma points
    Mar 19, 2012 @ 17:53
    Rocoeh
    0

    Not really but wil give it a go and get back.....

  • Lachlann 344 posts 626 karma points
    Mar 19, 2012 @ 22:54
    Lachlann
    1

    Perhaps some pictures would help.

    Here is the content structure I was describing:

    I call the Blocks 'CTAs' but the process is the same

    Using the uComponents multinode tree picker I can add these CTAs to any page I want, all the content is stored on the CTA node but it is replicated on many pages.

     

    I hope that makes things a bit clearer, you can find the uComponents package here:

    http://our.umbraco.org/projects/backoffice-extensions/ucomponents

    And the datatype you are looking for is the 'Multi-node tree picker' (https://ucomponents.codeplex.com/wikipage?title=MultiNodeTreePicker&referringTitle=Documentation)

    Hopefully that will make things a bit clearer, let us know how you get on.

    Best

     

    Lachlann

     

     

  • Rocoeh 65 posts 86 karma points
    Mar 20, 2012 @ 12:56
    Rocoeh
    0

    Great answer, are these editable though? As yours are CTA's does this mean they are fixed blocks of HTML, and uneditable?

     

  • Hendy Racher 863 posts 3849 karma points MVP 2x admin c-trib
    Mar 20, 2012 @ 13:11
    Hendy Racher
    0

    Hi Rocoeh,

    Following on from Lachlann's post, yes those CTAs can be fully editable - you also might find these blog posts useful ?

    http://jamesdrever.co.uk/blog/?p=149

    http://blog.hendyracher.co.uk/sidebar-widgets-with-umbraco-v4/

    HTH,

    Hendy

  • Rocoeh 65 posts 86 karma points
    Mar 20, 2012 @ 14:37
    Rocoeh
    0

    All good got it sorted but...

    -my block content can ve viewed at /block1.aspx, I see you have little keys which means I presume there is no public access to this content directly, how to I sort this?

    - is this a fairly common umbraco way to do this or would people be more likely to use template inheritance?

    Many thanks, you have helped me solve a Umbraco problem.

  • Lachlann 344 posts 626 karma points
    Mar 20, 2012 @ 14:47
    Lachlann
    0

    Great!

    Although your blocks have URL links becuase they sit outside of the home node they will not be included in the URL path. As long as your blocks folder appears below the Home node in the content tree you should be set.

    Best

    L

     

     

Please Sign in or register to post replies

Write your reply to:

Draft