Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
Hey ..
in umbraco - is it possible to change template from one to another with ex. xslt? or based on domain name? host-header or so?
ex.
i have a doc type called:
myFrontPageDocType
with a template:
myFrontPageTemplate
and i want based on some criteria to change that to another template called:
myAlternateFrontPageTemplate
You can add this to the querystring: altTemplate=myAlternateFrontPageTemplate
So for example: http://www.mydomain.com/home.aspx?altTemplate=myAlternateFrontPageTemplate would give you home.aspx with the myAlternateFrontPageTemplate
Well that link changed.. should've been mydomain.com/home.aspx?altTemplate=myAlternateFrontPageTemplate (let's home it works now).
kool ... thanks .. :)
but is there any other way of doing it? :-)
Not that I know of.. but perhaps other people can chime in?
You can create macro using renderContent, or use responseRedirect with some urlrewriting.
If you do go for a responseRedirect, make sure it's a 301 permanent redirect, else Google won't pick up your pages too well.
Hi,
Adding another syntax for using alternate templates (based on Seb's example):
www.mydomain.com/home/MyAlternateFrontPageTemplate.aspx
will also render home page with alternate template
Cheers,
/Dirk
is working on a reply...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
change template of doctype via XSLT or other means?
Hey ..
in umbraco - is it possible to change template from one to another with ex. xslt? or based on domain name? host-header or so?
ex.
i have a doc type called:
myFrontPageDocType
with a template:
myFrontPageTemplate
and i want based on some criteria to change that to another template called:
myAlternateFrontPageTemplate
You can add this to the querystring: altTemplate=myAlternateFrontPageTemplate
So for example: http://www.mydomain.com/home.aspx?altTemplate=myAlternateFrontPageTemplate would give you home.aspx with the myAlternateFrontPageTemplate
Well that link changed.. should've been mydomain.com/home.aspx?altTemplate=myAlternateFrontPageTemplate (let's home it works now).
kool ... thanks .. :)
but is there any other way of doing it? :-)
Not that I know of.. but perhaps other people can chime in?
You can create macro using renderContent, or use responseRedirect with some urlrewriting.
If you do go for a responseRedirect, make sure it's a 301 permanent redirect, else Google won't pick up your pages too well.
Hi,
Adding another syntax for using alternate templates (based on Seb's example):
www.mydomain.com/home/MyAlternateFrontPageTemplate.aspx
will also render home page with alternate template
Cheers,
/Dirk
is working on a reply...