I would like to get a Page URI from the Tridion Page PublishPath (URL from public site).
I know I can use the WebDavURL to get the Page – but there are many cases where this does not match the Page Path (such as the case when the Page Filename is ‘News Home’ but the filename is ‘index’).
I currently do not think this is possible in Tridion and have thought about the following solutions:
- Store the Page Publish Path in the Tridion Solr Index (by extending it)
Customized Tridion Search Index Handler: Custom vs Standard field for page url? - Use the Event System and persist the PublishPath and Uri to an external DB / KeyValueStore.
Other ideas?
This code would be used in a script that updates many pages but also for Editors to open a Page using the Page URL.
This may be considered an odd approach, but could you query the Broker to get the PageMeta by URL, and then you will be able to access the the URI from the PageMeta object?
Just a thought – but it is probably not ideal – Can you share some more background on the problem?