User Tools

Site Tools


tutorials:design_adv:template_set_loading

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
tutorials:design_adv:template_set_loading [2010/10/06 17:29]
jonyo
tutorials:design_adv:template_set_loading [2014/09/25 16:55] (current)
Line 14: Line 14:
 What the tutorial specifically does, is walk you through the steps to set it up so that it will "load" a specific template set, if you go to a //special URL// It can also be used by developers as a starting point for loading specific template set(s) based on some criteria, sort of as a "hello world" example. What the tutorial specifically does, is walk you through the steps to set it up so that it will "load" a specific template set, if you go to a //special URL// It can also be used by developers as a starting point for loading specific template set(s) based on some criteria, sort of as a "hello world" example.
  
-<tip c n>**Note:** This tutorial instructs on how to allow a site to use different template sets based on certain criteria.  This is **not needed** to simply change what template set is used.  For more info on how to actually create and use your own custom template sets, see the other tutorials in this section of the user manual.</tip>+<tip c n>**Note:** This tutorial instructs on how to allow a site to use different template sets based on certain criteria.  This is **not needed** to simply change what template set is used normally, for that just change what template set(s) are marked as active in the admin at [[/admin_menu/design/template_sets/start|Design > Template Sets]].  For more info on how to actually create and use your own custom template sets, see the [[tutorials/design/start|design basics]] tutorials.</tip>
  
 This tutorial will walk you through the steps to set up your site, so that someone can view the site using specific custom template set just by viewing a special URL. This tutorial will walk you through the steps to set up your site, so that someone can view the site using specific custom template set just by viewing a special URL.
Line 24: Line 24:
 **Instructions** **Instructions**
   - Turn off Geo cache, if currently turned on, in your admin at **Site Setup > Cache**.((Be sure to keep the cache turned OFF for as long as you are viewing the site with an alternate template set.  Otherwise it will cache your alternate template set any time you view the site using it, so that "normal" users will end up seeing the alternate template set!)) <   - Turn off Geo cache, if currently turned on, in your admin at **Site Setup > Cache**.((Be sure to keep the cache turned OFF for as long as you are viewing the site with an alternate template set.  Otherwise it will cache your alternate template set any time you view the site using it, so that "normal" users will end up seeing the alternate template set!)) <
-  - In your admin, at **Design > Template Sets**, ensure that the template set(s) that you want to have active "by default" are used.  That is, the template set you want to be used when a visitor views the website for the first time.  Note that if you make changes on this page later on, it will undo changes made during this tutorial. <+  - In your admin, at **Design > Template Sets**, ensure that the template set(s) that you want to have active "by default" are used.  That is, the template set you want to be used when a visitor views the website for the first time. <
   - For the purpose of this tutorial, we will assume your "main" template set is **my_templates** and the "special" template set is "new_design" In the rest of the instructions, it uses "new_design", just change that to be whatever you have named the folder for your template set, it will be the same as what is listed under "template sets not used" in the admin. <   - For the purpose of this tutorial, we will assume your "main" template set is **my_templates** and the "special" template set is "new_design" In the rest of the instructions, it uses "new_design", just change that to be whatever you have named the folder for your template set, it will be the same as what is listed under "template sets not used" in the admin. <
   - Download and open the file **geo_templates/t_sets.php** ((If you do not see that file on your site, in your admin at **Design > Template Sets** just click save and it will create the file.)).  The file will look something like this:   - Download and open the file **geo_templates/t_sets.php** ((If you do not see that file on your site, in your admin at **Design > Template Sets** just click save and it will create the file.)).  The file will look something like this:
Line 157: Line 157:
   * If you are afraid that someone you do not want to see the new design, might guess the **special URL**, and want to make it harder for them to figure out:  You can change that code to be whatever you want in the **t_sets.php** file.  You would then use a different URL based on what you changed the //code// to be. <   * If you are afraid that someone you do not want to see the new design, might guess the **special URL**, and want to make it harder for them to figure out:  You can change that code to be whatever you want in the **t_sets.php** file.  You would then use a different URL based on what you changed the //code// to be. <
   * You don't have to name the template set "new_design", it can be whatever you want it to be.  In the instructions above, you would substitute your own template set name wherever you saw "new_design". <   * You don't have to name the template set "new_design", it can be whatever you want it to be.  In the instructions above, you would substitute your own template set name wherever you saw "new_design". <
-  * Remember to keep your changes to be located **after** the line: <code php># [CUSTOM SECTION] #</code> and **Before** the line: <code php># [/CUSTOM SECTION] #</code>  If you do it that way, when changes are made in the admin panel, you custom code **will be left intact**.  Note that this functionality was **Added in 5.1.1**, if you have a previous version you will need to update to use this functionality. +  * Remember to keep your changes to be located **after** the line: <code php># [CUSTOM SECTION] #</code> and **Before** the line: <code php># [/CUSTOM SECTION] #</code>  If you do it that way, when changes are made in the admin panel, you custom code **will be left intact**.  Note that this functionality was **Added in 5.1.1**, if you have a previous version you will need to update to use this functionality. < 
-  * If you do not see the lines noted in the above note, and you are using at least version **5.1.1**, in your admin panel at **Design > Template Sets** make a change to what template sets are active and save changes, then change the settings back and save changes again.  That will re-create the t_sets.php file with the above section added.+  * If you do not see the lines noted in the above note, and you are using at least version **5.1.1**, in your admin panel at **Design > Template Sets** make a change to what template sets are active and save changes, then change the settings back and save changes again.  That will re-create the **t_sets.php** file with the above section added. <
  
 **Tips for PHP Developers:** (these require a little more "do it yourself PHP code") **Tips for PHP Developers:** (these require a little more "do it yourself PHP code")
tutorials/design_adv/template_set_loading.1286386180.txt.gz · Last modified: 2014/09/25 16:55 (external edit)