Advertisement
Change template via url param
Moderator: General Support Moderators
Forum rules
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.
- juanparati
- Joomla! Enthusiast
- Posts: 123
- Joined: Thu Nov 08, 2007 6:00 pm
- Location: Aarhus (Denmark)
Change template via url param
Is possible change a template/theme via url param?
For example something like:
http://myjoomla/index.php?setTemplate=ja-purity
For example something like:
http://myjoomla/index.php?setTemplate=ja-purity
From the code to the reality!
Advertisement
- juanparati
- Joomla! Enthusiast
- Posts: 123
- Joined: Thu Nov 08, 2007 6:00 pm
- Location: Aarhus (Denmark)
Re: Change template via url param
I have discover it!!???
Sometimes I am very lazy, sorry for monopolize this thread.
I have discover the param template:
For change a template directly from a url you can use:
http://myjoomla/index.php?template=ja-purity
With this param you (I) can change a template via url in joomla.
This trick is very useful for make a Wordpress/Drupal/etc template integration.
For example I want share the header (with the joomla menus) and the footer in a wordpress.
I can create two differente themes, "my-header" and "my-footer" theme. After in my wordpress theme I included a readfile('http://myjoomla/index.php?template=my-header') in the header and readfile('http://myjoomla/index.php?template=my-footer') in the footer.
Nice trick!
Sometimes I am very lazy, sorry for monopolize this thread.
I have discover the param template:
For change a template directly from a url you can use:
http://myjoomla/index.php?template=ja-purity
With this param you (I) can change a template via url in joomla.
This trick is very useful for make a Wordpress/Drupal/etc template integration.
For example I want share the header (with the joomla menus) and the footer in a wordpress.
I can create two differente themes, "my-header" and "my-footer" theme. After in my wordpress theme I included a readfile('http://myjoomla/index.php?template=my-header') in the header and readfile('http://myjoomla/index.php?template=my-footer') in the footer.
Nice trick!
From the code to the reality!
-
- Joomla! Intern
- Posts: 71
- Joined: Mon Aug 18, 2008 11:09 pm
Re: Change template via url param
Wow so simple.
You've changed my life! I've been looking all day for a solution.
Thanks
You've changed my life! I've been looking all day for a solution.
Thanks
-
- Joomla! Apprentice
- Posts: 33
- Joined: Fri Jan 19, 2007 1:39 am
Re: Change template via url param
Yes it works but it dosent remember the template.Each time you click a link it goes back to the default template.Did anybody managed to save the tamplate choosed from the URL?In a cookie or something...
- juanparati
- Joomla! Enthusiast
- Posts: 123
- Joined: Thu Nov 08, 2007 6:00 pm
- Location: Aarhus (Denmark)
Re: Change template via url param
If you want change a template permanently perhaps this can help you:
http://forum.joomla.org/viewtopic.php?f=428&t=377667
http://forum.joomla.org/viewtopic.php?f=428&t=377667
From the code to the reality!
-
- Joomla! Apprentice
- Posts: 33
- Joined: Fri Jan 19, 2007 1:39 am
Re: Change template via url param
Thank you!i will try it tommorow
-
- Joomla! Apprentice
- Posts: 12
- Joined: Tue Feb 17, 2009 6:46 pm
Re: Change template via url param
this is pretty close to my interest
what i am looking for is a line of code that i can put in my main template
like if url = yoursite.com/index.php&comcomponet=forum use template forum.css
that is wat i would like to see
so i dont have to use css2switch and can make template packs to give to my friends
what i am looking for is a line of code that i can put in my main template
like if url = yoursite.com/index.php&comcomponet=forum use template forum.css
that is wat i would like to see
so i dont have to use css2switch and can make template packs to give to my friends
- juanparati
- Joomla! Enthusiast
- Posts: 123
- Joined: Thu Nov 08, 2007 6:00 pm
- Location: Aarhus (Denmark)
Re: Change template via url param
From the code to the reality!
-
- Joomla! Apprentice
- Posts: 9
- Joined: Tue Apr 21, 2009 9:16 pm
Re: Change template via url param
This is perfect for the problem I am having!!! Thanks!
-
- Joomla! Fledgling
- Posts: 2
- Joined: Wed Jun 18, 2008 3:17 pm
Re: Change template via url param
I found this old post when I was looking for a solution to setting a template via the url parameter, my problem was that when someone entered my site via the url link that set the template it looked fine until they clicked on a link and then it switched back to the default template... Thought I would share what I found so maybe it will save someone else some time. I thought about hiring a Joomla expert but then I I found this nice component called MetaTemplate Pro that worked great. I was able to solve my problem of persistent urls.
-
- Joomla! Apprentice
- Posts: 10
- Joined: Thu Sep 22, 2011 9:48 am
- Location: Pune
- Contact:
Re: Change template via url param
Perfect. This saved ton's of my efforts. I am revamping my old site and was looking for a solution to setting a template via the url parameter. This thread just came as a life saving for me.
Advertisement