Can you too access yourdomain.com/document-type-name ? Bug?
Hi,
I'm just wondering if you can access www.(yourdomain).com/(document-type-name).
If I do It. I sometimes comes to logical pages and sometimes to really wierd ones on my own site. Ones that does not exist. I havn't created a /event page. But a "event" document type. But I can access a page /event. It somehow generates wierd text.
Daniel, it's the template you are seeing rather than the document type.
You can disable this behaviour by editing umbracoSetting.config (in the /Config folder). Set disableAlternativeTemplates = "true" in the web.routing section.
" By default you can add a altTemplate querystring or append a
template name to the current URL which
will make Umbraco render the content on the current page with the template you requested, for example:
http://mysite.com/about-us/?altTemplate=Home and http://mysite.com/about-us/Home would render the
"About Us" page with a template with the alias Home. Setting this setting to true stops that behavior"
Thx for your answer. It was partly helpful. I followed your advice and it did the trick with the template rendering. However. I can still access the url domain.com/event - even though the template doesn't show.
I want the 404 to fire. Do you know how to make that happen?
Ya, the alt templates can lead to some unexpected results, but they aren't all bad. They come in really handy when you want to do things like render a page with a print friendly template. I think cool stuff like that is why they come default enabled.
Can you too access yourdomain.com/document-type-name ? Bug?
Hi,
I'm just wondering if you can access www.(yourdomain).com/(document-type-name).
If I do It. I sometimes comes to logical pages and sometimes to really wierd ones on my own site. Ones that does not exist. I havn't created a /event page. But a "event" document type. But I can access a page /event. It somehow generates wierd text.
Anyone else experienced the same?
Hi Daniel,
Do you have an event template, if so that is why you can access a page like /event.
Try to see this video about alt-template http://umbraco.tv/videos/umbraco-v7/implementor/fundamentals/templating/alt-template/
Hope this helps,
/Dennis
Daniel, it's the template you are seeing rather than the document type.
You can disable this behaviour by editing
umbracoSetting.config
(in the /Config folder). SetdisableAlternativeTemplates = "true"
in theweb.routing
section.Hi Dan,
Thx for your answer. It was partly helpful. I followed your advice and it did the trick with the template rendering. However. I can still access the url domain.com/event - even though the template doesn't show.
I want the 404 to fire. Do you know how to make that happen?
Ya, the alt templates can lead to some unexpected results, but they aren't all bad. They come in really handy when you want to do things like render a page with a print friendly template. I think cool stuff like that is why they come default enabled.
Daniel,
I think you can remove the following line from
404handlers.config
to totally remove alt template facility:You may also need to remove SearchForAlias too.
is working on a reply...