Was wondering if there's a way to get current page url when you are inside your grid. Like in the example below if you are inside the "gridView", how do you get the Current Page URL?
Eg if you are rendering your grid as follow with the property of your grid called "content" and your grid view called "gridView" @Model.Content.GetGridHtml("content", "gridView")
No it´s not possible at the moment to get specific part of data in the grid. When you call the @Model.Content("content","gridView") you will get the full JSON data for the page.
How to get Current Page Url inside grid
Was wondering if there's a way to get current page url when you are inside your grid.
Like in the example below if you are inside the "gridView", how do you get the Current Page URL?
Eg if you are rendering your grid as follow with the property of your grid called "content" and your grid view called "gridView"
@Model.Content.GetGridHtml("content", "gridView")
Thanks
Hi Jeric,
You can get the current page url with this code,
But if you mean that that you want an url inside that grid, then I don´t think that is possible, because you can´t get specific part of the data in the grid on the page. Regard the grid layout best practices documentation https://our.umbraco.org/Documentation/Using-Umbraco/Backoffice-Overview/Property-Editors/Built-in-Property-Editors-v7/Grid-Layout-Best-Practices and see the limitation section. https://our.umbraco.org/Documentation/Using-Umbraco/Backoffice-Overview/Property-Editors/Built-in-Property-Editors-v7/Grid-Layout-Best-Practices#Limitations
/Dennis
Thanks Dennis, on a slightly different issue I've searched everywhere to find how to get the current page Url, so you've solved my problem :)
Hi Kitty,
I am glad that I could help you solve your problem.
Have a nice day :)
/Dennis
Thanks Dennis, thought so that we can't get specific part of data in the grid
Hi Jeric,
No it´s not possible at the moment to get specific part of data in the grid. When you call the @Model.Content("content","gridView") you will get the full JSON data for the page.
/Dennis
is working on a reply...