Try our conversational search powered by Generative AI!

EPiServer 8: Navigate by template and ID


Is it still possible in some way to access a certain page by it's template and id? We have a site that's been migrated to CMS 8 and a function that uses this has stopped working.

In earlier versions it was possible to access it as such: 

Feb 18, 2016 11:41

No need for a template any more. The URL structure is as follows:


So for your example you should be able to use something like:

Feb 18, 2016 11:51

But this is only for logged in users. I want to request the site as a visitor.

We have an old javascript that fetches the ID of the page we want to insert and then builds a request from that.

Feb 18, 2016 12:04

If you are using MVC this will probably not be possible without some customisation. I've never tried it with WebForms in CMS 7+ if I am honest.

It sounds like there may be some alternatives - what is your specific requirement?

Feb 18, 2016 12:07

If there's no other way, maybe I should rewrite the code then.

We have a site with a control on it. The control has data that's changing through ajax depending on what option the visitor is clicking on. The list of options is a li with a data-attribute with the ID of the page that is supposed to be fetched. On the onClick event the script fetches that page and displays it. I will try to rewrite it if it's not possible anymore to fetch a site only with ID through the browser.

Feb 18, 2016 12:11

One elegant way to solve the problem would be to simply render the fully qualified URL into markup for AJAX request and let the code continue as before.

Feb 18, 2016 12:16

Yeah, I thought so to. Will do that. Thanks for the help!

Feb 18, 2016 12:19
This topic was created over six months ago and has been resolved. If you have a similar question, please create a new topic and refer to this one.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.