[solved] Template Switcher url/page=templatename
[solved] Template Switcher url/page=templatename
Anything like this for the latest v. of CMSMS?
			
			
													
					Last edited by carasmo on Thu May 02, 2013 4:25 am, edited 1 time in total.
									
			
						
										
						Re: Template Switcher url/page=templatename
Or a style switcher
page=nameofstylesheet
			
			
									
						
										
						page=nameofstylesheet
- 
				chandra
 
Re: Template Switcher url/page=templatename
Add something like this to the switch link
and modify your template
			
			
									
						
										
						Code: Select all
&style=newcssCode: Select all
{if $smarty.server.get.style}
  {cms_stylesheet name=$smarty.server.get.style}
{else}
  {cms_stylesheet}
{/if}Re: Template Switcher url/page=templatename
Thanks! I don't follow this since it's not really explicit (not a programmer) but I found a small javascript solution where I append the url:
			
			
									
						
										
						Code: Select all
<!--Load Style Sheet based on appended url add url-->		
//http://www.javascriptkit.com/javatutors/loadjavascriptcss.shtml
if(window.location.href.indexOf('?layout=test') > -1) {
    var fileref=document.createElement("link");
    fileref.setAttribute("rel", "stylesheet");
    fileref.setAttribute("type", "text/css");
    fileref.setAttribute("href", "assets/css/newstyle.css");
    document.getElementsByTagName("head")[0].appendChild(fileref);
    
$(document).ready(function() {
$('a').click(function(){
  if( !this.search ) this.search = '?layout=test';
});
   }); 
} //if layout=test
Re: [solved] Template Switcher url/page=templatename
Code: Select all
 {cms_stylesheet name=$page_alias} - + - + - + - + - + - + -
LATEST TUTORIAL AT CMS CAN BE SIMPLE:
Migrating Company Directory module to LISE
Migrating Company Directory module to LISE
- + - + - + - + - + - + -


