how do i use Contour Library methods in Umbraco v7.1.1
I understand that Umbraco version 7 did away with extended xslt. So how can I use the former macros such as GetApprovedRecordsFromPage using the UI. The macros don't exist in version 7 so is there a new way to get records instead of using xslt?
how do i use Contour Library methods in Umbraco v7.1.1
I understand that Umbraco version 7 did away with extended xslt. So how can I use the former macros such as GetApprovedRecordsFromPage using the UI. The macros don't exist in version 7 so is there a new way to get records instead of using xslt?
Thanks
Robert
Hi Robert,
I found some documentation for working with data from Contour in Razor,
http://our.umbraco.org/projects/umbraco-pro/contour/documentation/Developer/Working-with-Contour-data-in-Razor/
I hope this help you in some way.
/Dennis
Thank you, That got me close.
Robert
Hi Robert,
Did you find out how to use the Contour Library methods in Razor. If not this could be a an example of how to get GetRecordsFromForm:
http://our.umbraco.org/forum/umbraco-pro/contour/50231-GetRecordsFromForm-in-Razor?p=0#comment179809
/Dennis
Yes, I had to modify the document example and have a basic razor script working. Here it is:
@inherits umbraco.MacroEngines.DynamicNodeContext
@using Umbraco.Forms.Mvc.DynamicObjects
<ul id="comments">
@foreach (dynamic record in
Umbraco.Forms.Mvc.DynamicObjects.Library.GetApprovedRecordsFromPage(@Model.Id).OrderBy("Created"))
{
<li>
@record.Created.ToString("dd MMMM yyy")
@if(string.IsNullOrEmpty(record.Website)){
<strong>@record.Name</strong>
}
else{
<strong>
<a href="@record.Website" target="_blank">@record.Name</a>
</strong>
}
<span>said</span>
<p>@record.Comment</p>
</li>
}
</ul>
Thanks
Robert
is working on a reply...