Copied to clipboard

Flag this post as spam?

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


  • Peter Schermers 112 posts 134 karma points
    Oct 15, 2012 @ 15:01
    Peter Schermers
    0

    Field from page link

    On my homepage, I have three 'blocks', which include a title, a photo and a teaser text (don't know if the word 'teaser' is a common used English word, but I hope you'll understand what I mean ;-), with a hyperlink beneath it, leading to a page with the complete text.

    The idea is to let the user use the content picker to chose a page (with a paragraph on it) from which the teaser should be automatically generated. How can I accomplish this? 

  • Peter Schermers 112 posts 134 karma points
    Oct 15, 2012 @ 15:04
    Peter Schermers
    0

    Oh, and I'm trying to build this using Razor ;-)

    I need to get the filled in hyperlink (not a problem), but then also add a (paragraph) field property to it so I can then create a teaser from it, I guess. Right?

  • gilad 185 posts 425 karma points
    Oct 15, 2012 @ 15:31
    gilad
    0

    Hii peter.

    In such cases I prefer to add a field - "Home page short text" , "Lobby text".

    Like this - the user have full control over the text.

  • Tom Madden 253 posts 455 karma points MVP 4x c-trib
    Oct 17, 2012 @ 01:07
    Tom Madden
    0

    Peter, teaser is a common term for this intro text, you could do something quick and dirty like this:

    @inherits umbraco.MacroEngines.DynamicNodeContext
    @using umbraco.MacroEngines
    @{var node = new DynamicNode(Current.GetPropertyValue("link"));
      @node.GetPropertyValue("teaser")
    }

    where "link" is your contentPicker to select the required node, and teaser is your content property

    HTH

    Tom

  • Peter Schermers 112 posts 134 karma points
    Oct 17, 2012 @ 08:38
    Peter Schermers
    0

    Hi Tom,

     

    Thanks, I'll try that!

Please Sign in or register to post replies

Write your reply to:

Draft