Grid Layout, How do you get the HTML out for the grid in a class?
Does anyone know how to get the rendered output of a grid layout in code? I am building an API that I need to include the HTML from a grid layout property. The HTML helper "GetGridHtml" seems to be only available in a view.
I'm currently looking into the same thing - for now I'm using the old method which is an extension on a render model I think - Model.Content.GetGridHtml(). It's deprecated however so we'll need to find another method.
I'll let you know if I find another solution but in the meantime that could work, or at least set you on the right path.
Grid Layout, How do you get the HTML out for the grid in a class?
Does anyone know how to get the rendered output of a grid layout in code? I am building an API that I need to include the HTML from a grid layout property. The HTML helper "GetGridHtml" seems to be only available in a view.
Hi Jason,
I'm currently looking into the same thing - for now I'm using the old method which is an extension on a render model I think -
Model.Content.GetGridHtml()
. It's deprecated however so we'll need to find another method.I'll let you know if I find another solution but in the meantime that could work, or at least set you on the right path.
Thanks, Ben. I found a similar thing. I wish that GetGridHtml was an extension off of the UmbracoHelp instead of one that was off of the HtmlHelper.
is working on a reply...