Calling all developers! We invite you to provide your input on Feature Experimentation by completing this brief survey.
Calling all developers! We invite you to provide your input on Feature Experimentation by completing this brief survey.
Hi Tobias,
If your content types of the content in question have controllers then you should be able to access the content via episerver's standard routing and should be able to use the methods you mentioned above to retrieve the url. If not, you'd need to use an alternative mechanism such as partial routing to route to the content in which case it's more complex.
Are you using standard routing or partial routing (or something else) to access the content?
Ah of course. I mixed it up a bit when trying to set the correct address to the page. The page has a controller but when setting this up I was referring to the parent of these pages which is a ContainerPage which has no Controller or view.
We have a single site but to keep the structure clean we put some content outside of the regular startpage structure, we call it Global Content. The content is mostly just settings and "data pages" containing data that is used enrich the regular content on the page, like Tag Pages concept that Allan is talking about here: https://www.codeart.dk/blog/2018/10/design-pattern-tag-pages-instead-of-categories/
In some cases we would like to load a partial view of some of content laying here. We can navigate to that just as usual content, eg. /content/outside/startpage, but when programmatically trying to get the url for that content with either Geta EpiExtensions GetFriendlyUrl or using the UrlResolver directly just gives us null.
Is there something special needed to be able to get the url programmatically?