This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
tutorials:design_adv:template_set_loading [2009/06/04 15:48] jonyo wording |
tutorials:design_adv:template_set_loading [2014/09/25 16:55] (current) |
||
---|---|---|---|
Line 1: | Line 1: | ||
+ | {{indexmenu_n> | ||
====== Template Set Loading ====== | ====== Template Set Loading ====== | ||
<tip c w> | <tip c w> | ||
+ | |||
+ | Changes made using this tutorial can be undone using any of the pages in the admin panel under **Design > ** admin menu, so be sure to keep a " | ||
Before attempting to make changes as described here, be sure you have a **firm grasp of [[tutorials/ | Before attempting to make changes as described here, be sure you have a **firm grasp of [[tutorials/ | ||
Line 11: | Line 14: | ||
What the tutorial specifically does, is walk you through the steps to set it up so that it will " | What the tutorial specifically does, is walk you through the steps to set it up so that it will " | ||
- | **Requires Geo 4.0.0** | + | <tip c n> |
- | + | ||
- | <tip c n> | + | |
- | + | ||
- | These instructions can be used "in place of" or "in addition to" the steps from other tutorials that instruct you to click the **Use Set** button to start using a custom template | + | |
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 23: | ||
**Instructions** | **Instructions** | ||
- | - Turn off Geo cache, if currently turned on, in your admin at **Site Setup > Cache**. < | + | - 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 " |
- | - In your admin, at **Templates | + | - In your admin, at **Design |
- For the purpose of this tutorial, we will assume your " | - For the purpose of this tutorial, we will assume your " | ||
- | - Download and open the file **geo_templates/ | + | - Download and open the file **geo_templates/ |
<code php> | <code php> | ||
<?php | <?php | ||
Line 36: | Line 35: | ||
## if you want. | ## if you want. | ||
## | ## | ||
- | ## Generated: | + | ## Generated: |
########################################### | ########################################### | ||
Line 48: | Line 47: | ||
* NOTE: Default template set is always added by system as the last template set | * NOTE: Default template set is always added by system as the last template set | ||
| | ||
+ | | ||
+ | * If you do not wish manual changes to be overwritten next time admin makes a | ||
+ | * change, be sure to put them in the " | ||
*/ | */ | ||
- | + | ||
+ | if (!defined(' | ||
+ | # [CUSTOM SECTION] # | ||
+ | //Anything manually added to this section will be left intact even if changes | ||
+ | //are made in the admin panel. | ||
+ | |||
+ | //BOO! | ||
+ | |||
+ | # [/CUSTOM SECTION] # | ||
+ | } | ||
geoTemplate:: | geoTemplate:: | ||
</ | </ | ||
- | If you are only using the default template set, that last line will be replaced by a //PHP Comment// stating that there are no template sets. That is normal. | + | If you are still only using the default template set, that last line will be replaced by a //PHP Comment// stating that there are no template sets. That is normal, however this setup is not common on " |
< | < | ||
- | - Add the following code after the "*/" | + | - Add the following code between |
<code php> | <code php> | ||
########## | ########## | ||
Line 64: | Line 76: | ||
//set a cookie to remember it, but make the cookie only last as long as the | //set a cookie to remember it, but make the cookie only last as long as the | ||
//browser session | //browser session | ||
- | set_cookie(' | + | setcookie(' |
//set cookie global so it works for this page load | //set cookie global so it works for this page load | ||
$_COOKIE[' | $_COOKIE[' | ||
Line 83: | Line 95: | ||
## if you want. | ## if you want. | ||
## | ## | ||
- | ## Generated: | + | ## Generated: |
########################################### | ########################################### | ||
Line 95: | Line 107: | ||
* NOTE: Default template set is always added by system as the last template set | * NOTE: Default template set is always added by system as the last template set | ||
| | ||
+ | | ||
+ | * If you do not wish manual changes to be overwritten next time admin makes a | ||
+ | * change, be sure to put them in the " | ||
*/ | */ | ||
+ | |||
+ | if (!defined(' | ||
+ | # [CUSTOM SECTION] # | ||
+ | //Anything manually added to this section will be left intact even if changes | ||
+ | //are made in the admin panel. | ||
########## | ########## | ||
Line 105: | Line 125: | ||
//set a cookie to remember it, but make the cookie only last as long as the | //set a cookie to remember it, but make the cookie only last as long as the | ||
//browser session | //browser session | ||
- | set_cookie(' | + | setcookie(' |
//set cookie global so it works for this page load | //set cookie global so it works for this page load | ||
$_COOKIE[' | $_COOKIE[' | ||
Line 114: | Line 134: | ||
} | } | ||
########## | ########## | ||
+ | |||
+ | # [/CUSTOM SECTION] # | ||
+ | } | ||
geoTemplate:: | geoTemplate:: | ||
Line 134: | 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 " | * You don't have to name the template set " | ||
+ | * Remember to keep your changes to be located **after** the line: <code php># [CUSTOM SECTION] #</ | ||
+ | * 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. | ||
**Tips for PHP Developers: | **Tips for PHP Developers: |