Copied to clipboard

Flag this post as spam?

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


  • David W. 159 posts 284 karma points c-trib
    Jun 01, 2012 @ 14:51
    David W.
    0

    Looking forward to try this, but it would be nice to have some sample code on how to fetch and render the data.

    Thanks.

  • Mike Taylor 155 posts 353 karma points
    Jun 01, 2012 @ 14:57
    Mike Taylor
    0

    Here's a quick Razor example --- obviously, you may want to do things differently depending on how you want to output the data. (Ignore lines 13-18, they're rendering other fields from my doctype).

    http://snipt.org/ujijc1

     

  • DanH 36 posts 61 karma points
    Mar 13, 2013 @ 22:34
    DanH
    0

    Here's a really simple version that can be customized:

     

    @using Umbraco.Core.Dynamics

    @inherits Umbraco.Web.Mvc.UmbracoTemplatePage

    @{

    DynamicXml rates = (DynamicXml)Model.Content["table"];

    }

     

    <table>

    <tbody>

    @foreach (var row in rates.BaseElement.Descendants("Row"))

    {

    <tr>

    @foreach (var col in row.Descendants())

    {

    <td>

    @col.Value

    </td>

    }

    </tr>

    }

    </tbody>

    </table>

     

Please Sign in or register to post replies

Write your reply to:

Draft