Hi Guys,
I am trying to get an Item in Razor using the SystemName and the paragraph ID but I cannot make it work.
I have used some of the information from here: http://developer.dynamicweb.com/documentation/for-developers/item-based-structure/querying-items.aspx
I tried: var paragraph = Dynamicweb.Content.Items.ItemManager.Storage.GetByParagraphId("StandardParagraph", paragraphID );
I get a nasty error:
Exception in template (Designs\NewDesign\ItemPublisher/List/JobList_Careers.cshtml): System.FormatException: Index (zero based) must be greater than or equal to zero and less than the size of the argument list. at System.Text.StringBuilder.AppendFormat(IFormatProvider provider, String format, Object[] args) at System.String.Format(IFormatProvider provider, String format, Object[] args) at Dynamicweb.Content.Items.Queries.Repository.SelectByParagraphId(IEnumerable`1 paragraphIds, Query query) at Dynamicweb.Content.Items.Queries.StorageManager.GetByParagraphId(String systemName, Int32 paragraphId) at CompiledRazorTemplates.Dynamic.edffeacfaeac.Execute() at RazorEngine.Templating.TemplateBase.RazorEngine.Templating.ITemplate.Run(ExecuteContext context) at RazorEngine.Razor.Parse[T](String razorTemplate, T model, String cacheName) at Dynamicweb.Rendering.Template.Output()
Any ideas?
Thanks,
Adrian