I have a large site using the Content App and we have a wide variety of Views. In both testing and development we increasingly need to know what pages a View is in use. As I said, the site is large, well past 500 pages, knowing what page a View got used on is beyond impossible.
Is there some way to in 2sxc to figure this out? A feature I am not aware of? Debugging? Insights? I am willing to do it in code in a View. I was thinking it could be solved by doing a partial...
if(IsSuperUser(Dnn.User)) {
@RenderPage("_Debug_ListPagesUsingThisView.cshtml")
}
I am having trouble understand how or where to start. Is there a way to get to the Entity (record) of the View from within a view? Once I have that, is there a path to get to the app's module settings? where is the info actually stored that tells the App what View to use? And can I get to it?
- DNN 9.03.02
- 2sxc 10.9.1
- Content App 3.03.x
ADDITIONS Continuing from the comment chain below...
I can't get any further yet, the Entity I get returned from foreach(... .Parents()) has the following fields: Template, Content, Presentation, ListContent, and ListPresentation ... but I cannot figure out how to get any data or fields out of it. Though myEntity.Content.Count (and .Template.) shows 1, any attempt to access it beyond GetType() (its a list of Dynamic Entities) returns a null. Which seems odd.
Do you know what the Entity type actually is and how to use it? The interesting thing is that the count from .Parents() returns the same number of items as in the Content-Type assigned for this View, but when I look in the (SQL) data, they are a different EntityId than the actual Content (e.g. if I trace parent EntityId 3344 I find that nearby EntityId 3343 is one of the Content-Type records this View is displaying somewhere). So thats an interesting clue. Ideas?
}` ?