Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
Looking forward to try this, but it would be nice to have some sample code on how to fetch and render the data.
Thanks.
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
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>
is working on a reply...
This forum is in read-only mode while we transition to the new forum.
You can continue this topic on the new forum by tapping the "Continue discussion" link below.
Continue discussion
Razor/XSLT-samples
Looking forward to try this, but it would be nice to have some sample code on how to fetch and render the data.
Thanks.
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
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>
is working on a reply...
This forum is in read-only mode while we transition to the new forum.
You can continue this topic on the new forum by tapping the "Continue discussion" link below.