Copied to clipboard

Flag this post as spam?

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


  • Dan Sørensen 102 posts 327 karma points
    Apr 09, 2015 @ 13:06
    Dan Sørensen
    0

    Get teaser text from grid layout

    As in headline I would like to know if I easily can get like the first 100 words from a grid layout. I using the grid layout to my news because it gives a more flexible way to insert content.

  • Dennis Aaen 4500 posts 18255 karma points admin hq c-trib
    Apr 09, 2015 @ 13:11
    Dennis Aaen
    0

    Hi Dan,

    One of the limitations about the grid layout at the momemnt is that you can´t get specific parts of the grid content, you will get the whole JSON, when you get the data by using the

    @CurrentPage.GetGridHtml("propertyAlias")

    Or

    @Model.Content.GetGridHtml("propertyAlias")

    See the documentation about grid layout best practices andthe limitations here: https://our.umbraco.org/Documentation/Using-Umbraco/Backoffice-Overview/Property-Editors/Built-in-Property-Editors-v7/Grid-Layout-Best-Practices#Limitations

    Hope this helps,

    /Dennis

  • Dan Sørensen 102 posts 327 karma points
    Apr 09, 2015 @ 13:14
    Dan Sørensen
    0

    Yes this I actually was already aware of that you get the whole JSON, so you would not suggest me to start digging in to the JSON and getting what I need?..

  • Dennis Aaen 4500 posts 18255 karma points admin hq c-trib
    Apr 09, 2015 @ 13:24
    Dennis Aaen
    0

    Hi Dan,

    If you know how you can dig into the JSON object, and get the data you need, then I can´t see why you shouldn't give it a try. And if you find any downside, with it, then you know why, and then you should consider find another way of structure your news items.

    But just my thoughts.

    /Dennis

Please Sign in or register to post replies

Write your reply to:

Draft