How to detect if a specific doctype has a template assigned
In a razor view I am creating a breadcrumb with links.
There I am parsing the url and I need to detect if the specific portion of the url has a template assigned.
For instance:
For the url /contacto/ubicacion-clinica-centro I have 2 possible links
/contacto - That is contentFolder doctype, without template
/contacto/ubicacion-clinica-centro - This is a contentPage with template
How can I detect if the string "contacto" that has the doctype "contentFolder" does not have an assigned template in a razor view?
How to detect if a specific doctype has a template assigned
In a razor view I am creating a breadcrumb with links. There I am parsing the url and I need to detect if the specific portion of the url has a template assigned.
For instance:
For the url /contacto/ubicacion-clinica-centro I have 2 possible links
/contacto - That is contentFolder doctype, without template /contacto/ubicacion-clinica-centro - This is a contentPage with template
How can I detect if the string "contacto" that has the doctype "contentFolder" does not have an assigned template in a razor view?
Hi Nicolas,
You can always check on TemplateId property of IPublishedCotnent object, for example, template id of the current page:
Thanks,
Alex
is working on a reply...