How to use "Learning to let go" (LTLG)

Using Learning to let go to make your site customisable is very easy.

Step 1 of 3: Include LTLG in your documents

After downloading your copy, unpack it and include "ltlg.php" as a style sheet in your documents.

Examples

<style type="text/css">
	@import "ltlg.php";
</style>
or 
<link rel="StyleSheet" href="ltlg.php" type="text/css">
		

Step 2 of 3: Add the link to the LTLG form to your documents

Add a very prominent link to "ltlg_define.php" to your document.

This will enable users to enter their settings, set the cookie and make LTLG work.

By default, "ltlg_define.php" links back to index.html, if you want to overwrite this default add your page name as a parameter, like:

<a href="ltlg_define.php?p=home.html">Customise this page.</a>

Step 3 of 3: Tweak LTLG to your needs

Edit the file "ltlg.css" to cater your needs. This file gets included by ltlg.php and applies the necessary part of the stylesheet to position the navigation and colour the content part.

To achieve that, ltlg.php needs some settings and some special comments in the CSS that need not to be changed.

The settings

/* 
	Learning to let go settings
	Name of the cookie 			
	<cookieName>icantparam</cookieName>

/* Changes in 1.1 */	
	Filename of the header, applied before the form
	<header>header.html</header>
	Filename of the footer, applied after the form
	<footer>footer.html</footer>
	
	Defines if the form should be written out as XHTML or not.
	$isXHTML = false; false or true
/* end changes */	

	Possible stylesheets
	the titles will be displayed in the dropdown
	the values in between the tags are the filenames (without .css)
	<style title="green and images">maincss</style>
	<style title="no images">imagefree</style>
	<style title="high contrast">highcontrast</style>
	
	The following variables will be replaced by the 
	data entered in the form; you can define a preset here. 
	Make sure to end your preset with a semicolon.

	Position of the navigation
	bottom=0, top=1, left=2, right=3
	$navpos = 1; 
	$centercontent = on;  on or off
	$css = maincss; 
	
	$fontSize = 80%;
	$contentWidth = 800px;
	$background = #ccc;
	$foreground = #333;
	$linkColour = #fcc;
	$visitedLinkColour = #c99;
	$navLinkColour = #fff;
	$navVisitedLinkColour = #fcc;
	
	Note:do not change the syntax of the comments of the 
	<> tags!
*/

The cookie name is the name the cookie will be stored as, make this one unique to your site to avoid other sites using ltlg overwriting it.

The header and footer filenames define the chunks of code that will be added before and after the form (Added in 1.1).

Your CSS Settings

Add the necessary CSS chunks in between the appropriate "comment-tags" and ensure to keep the "comment-tags" as they are.

If you don't want to offer one or more of these options, delete the completet "comment-tag", and the option will not appear in the form any longer.

You can use any of the abovementioned variables in your CSS.

/* link settings */
/* <links> */

/* </links> */

/* Standard settings */
/* <standard> */

/* </standard> */

/* Settings for centered content */
/* <centered> */

/* </centered> */

/* Settings necessary for the navigation to be on the top */
/* <top> */

/* </top> */

/* Settings necessary for the navigation to be on the bottom */
/* <bottom> */

/* </bottom> */

/* Settings necessary for the navigation to be on the left */
/* <left> */

/* </left> */

/* Settings necessary for the navigation to be on the right */
/* <right> */

/* </right> */

Too see how it was done here, check the CSS file.