Accessing the grid layout content programmatically
Hi, I am using a grid layout datatype (from the default fano template). As the structure of the page is now determined by the editor, how do I as a programmer retrieve specific parts of the page content programmatically. Eg. My client has a news page with multiple rich text editors in the grid. I need to extract the leader text and display it on a summary page elsewhere.
At the moment it is not possible for you to take a chunk of the content from a grid editor. The grid is also the first draft of it since it was introduced in Umbraco 7.2. I have no information if this will be possible in a later versions of Umbraco.
In the section you can see one of the limitations is that - There is no managed api to drill into the grid content and target specific cell content - so a grid layout is not a recommended storage of reusable content.
I know this is an old thread, but I'm curious if Umbraco 8.17+ still doesn't have a way to target a grid cell(s)? For example, we have an RSS Feed and one of the right cells has an email sign-up that we don't want to display in the feed...
Accessing the grid layout content programmatically
Hi, I am using a grid layout datatype (from the default fano template). As the structure of the page is now determined by the editor, how do I as a programmer retrieve specific parts of the page content programmatically. Eg. My client has a news page with multiple rich text editors in the grid. I need to extract the leader text and display it on a summary page elsewhere.
Any help much appreciated.
Hi Shahid,
At the moment it is not possible for you to take a chunk of the content from a grid editor. The grid is also the first draft of it since it was introduced in Umbraco 7.2. I have no information if this will be possible in a later versions of Umbraco.
But if you see the best practices for the grid layout there is a section about limitations for the grid layout. http://our.umbraco.org/Documentation/Using-Umbraco/Backoffice-Overview/Property-Editors/Built-in-Property-Editors-v7/Grid-Layout-Best-Practices
In the section you can see one of the limitations is that - There is no managed api to drill into the grid content and target specific cell content - so a grid layout is not a recommended storage of reusable content.
/Dennis
I know this is an old thread, but I'm curious if Umbraco 8.17+ still doesn't have a way to target a grid cell(s)? For example, we have an RSS Feed and one of the right cells has an email sign-up that we don't want to display in the feed...
is working on a reply...