Copied to clipboard

Flag this post as spam?

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

  • Jukka-Pekka Keisala 80 posts 204 karma points
    Nov 29, 2009 @ 11:00
    Jukka-Pekka Keisala

    Best Practices for dynamic frontpage

    I would like to know how developers usually solve issue in backend architecture when creating frontpage/landing page AJAX carousels, teasers, campaigns and other areas that links to a subpages.

    Let's say you are about build in Umbraco and you need to push some news in the frontpage. News in frontpage of BBC News are not automatically picked up as the latest but they are top stories somehow chosen.
    How would you pick up those top stories?

    1. Static fields in Frontpage node?
    - Do you make it "static" field on document type where you then manually write teaser texts?

    2. Push to frontpage in actual news document type?  
    - Do you make some checkbox/weight -fields on news document type? For example saying this is breaking news/show in breaking news, this news weight is 1-5?

    3. Custom functionality
    - Would you create some custom news picker functionality that builds frontpage from content items?

    4. Other ideas?


  • Nik Wahlberg 639 posts 1237 karma points MVP
    Nov 29, 2009 @ 15:08
    Nik Wahlberg


    traditionally I tend to use option 2 when dealing with featureing content. This, especially with regards to news items, is usually coupled with an expiration date so that automatic removal from the page will happen if it doesn't get pushed off by the "top n" logic. If you are trying to run this as an Ajax call or consume it via a simple XML get you can also consider generating the XML (or other format) doc upon publishing of your news doc type by tieing into ante Document_AfterPublish event.

    Hope this is useful info.

    -- Nik

  • Jan Skovgaard 11264 posts 23594 karma points MVP 9x admin c-trib
    Nov 29, 2009 @ 17:03
    Jan Skovgaard

    Hi Jukka

    You could also make some fields on the document type with the content picker datatype. That would require the content editor to manually select the frontpage news. The advantage is that you don't need to have duplicate data in your tree. But it's not ideal if you need it to happen automatically of course.

    Just thought that I would mention this option, since it can be very nice in some scenarios.


  • Finn 86 posts 50 karma points
    Nov 29, 2009 @ 23:46

    Hi Jukka

    In a corporate intranet I developed, there is a news section for each department. When a newsitem is created the user (web editor) decide if it has potential to make it to the frontpage (is it general news or just for the department?) by checking a true/false property “showOnFrontpage”.

    Then the xslt for-each looks something like this:

    <xsl:for-each select="umbraco.library:GetXmlAll()/descendant-or-self::node [@nodeTypeAlias=’newsItem’ and
    string(data[@alias='showOnFrontpage']) = '1' ]">

    Hope you can use it!


  • Petr Snobelt 923 posts 1535 karma points
    Nov 30, 2009 @ 11:54
    Petr Snobelt

    I use Multiple Picker ( to pick what to show on homepage, when you go to showOnFrontpage route, you have problems with sorting.

    You can also use RCC ( and config it to allow pick news item and and add some text to item.



  • Rik Helsen 670 posts 873 karma points
    Nov 30, 2009 @ 13:24
    Rik Helsen

    Specific nodetypes and a flag "show on homepage" usually does it for me, we also have a lot of "navigation from source" blocks that we use on homepages...

  • Finn 86 posts 50 karma points
    Nov 30, 2009 @ 13:37

    Sorting absolutely no problem…

    Here is an example with a property called newsDate that has a dateTimePicker as datatype

    <xsl:sort select="umbraco.library:FormatDateTime(data[@alias='newsDate'],'yyyyMMddHHmm')" order="descending"/>

    And you can sort on everything else as normal with xslt!

  • Laurence Gillian 600 posts 1219 karma points
    Nov 30, 2009 @ 13:43
    Laurence Gillian

    Option two, and then build flexible macro's which you can pass different parameters too. 

    A common macro I'd use, would allow you to select the parent ID, how many child items (sorted by date), wrap tags, and parent/child classes, and say also if a summary is displayed.

    This can then be used multiple times on the frontpage, and also in sub sections where you need summaries of content. 


    Generally our apporach is to build an XSLT macro and then refactor it to make it flexible so it can be reused across the site and also as starting point code for other projects.


    When the front-page might have a changing mashup of different page content you could also have a frontpage doctype, which had content pickers which the selected ID's could be used to call the relevant Macros.


  • Jukka-Pekka Keisala 80 posts 204 karma points
    Nov 30, 2009 @ 18:50
    Jukka-Pekka Keisala

    I think Multiple Picker field approach would be the most suitable. I would assume that pushing content to the frontpage using "showinfrontpage" field in actual news node would result hard to control frontpage as there would not be much control what in the end is shown and in which order. Though, I guess ideal would be some kind of combination but that would then probably result complexity for the editors. 

  • Lee Kelleher 4007 posts 15711 karma points MVP 12x admin c-trib
    Nov 30, 2009 @ 19:01
    Lee Kelleher

    We use a "show on homepage" field (of sorts) on Freelance Supermarket - see the "popular stories" on the right-sidebar, (mis-leading title, as they aren't popular, but editorial picked).

    The way we got around the sorting problem was instead of using a checkbox, we used a numeric data-type ... so if the value was greater than zero, it displays in the right-sidebar.  The sort order is ascending, so 1 is top and 99+ is bottom, for conflicting numbers/priorities, we fall-back on date/time sorting (descending).

    We did consider using a multiple-content picker - which would work, but that meant republishing the homepage - whereas my client preferred control on a per-article/node basis.

  • Mikael Mørup 297 posts 326 karma points
    Dec 03, 2009 @ 12:23
    Mikael Mørup

    I did it with a combination of :

    -marking items as news, with a checkbox and a newsexpire date and a priority field. when the page loads i select the XX newst items that are marked as news and are not yet expired. Some pages use the priority property of the pages as well.

    - (semi) randomly selected teasers




Please Sign in or register to post replies

Write your reply to: