changelog shortlog tags branches changeset file revisions annotate raw help

Mercurial > hg > werc / sites/werc.cat-v.org/docs/site-customization.md

revision 635: dd58ad29ffbf
parent 446: af8a699bb8c1
child 646: 8704f5149b91
     1.1--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2+++ b/sites/werc.cat-v.org/docs/site-customization.md	Sun May 30 18:04:04 2010 +0000
     1.3@@ -0,0 +1,50 @@
     1.4+Site Customization
     1.5+==================
     1.6+
     1.7+To change any of the default templates and include files simply copy them
     1.8+from /lib/ to your site's _werc/lib/ and edit at will.
     1.9+
    1.10+File Types
    1.11+----------
    1.12+
    1.13+* '.tpl' files are rc [template files](rc_template_lang).
    1.14+* '.inc' are text files that are inserted 'as is' without any extra processing.
    1.15+
    1.16+Site Groups
    1.17+-----------
    1.18+
    1.19+Site configuration and customization and be 'grouped' to allow a shared set of templates among a specific group of sites (useful for sets of sub-domains for example).
    1.20+
    1.21+Simply set 'masterSite' configuration variable to the name of the site you want to 'inherit' templates, style and configuration from.
    1.22+
    1.23+For example, if we have two sites bar.com and foo.bar.com, and in sites/foo.bar.com/_werc/conf we add:
    1.24+
    1.25+    masterSite=bar.com
    1.26+
    1.27+When a template (eg., 404.tpl) is requested it will be looked up first in /sites/foo.bar.com/_werc/lib/404.tpl, if that fails then in /sites/bar.com/_werc/lib/, and if that is missing too, the default /lib/404.tpl is used.
    1.28+
    1.29+The same applies to .inc files.
    1.30+
    1.31+
    1.32+List of Template and Included Files
    1.33+-----------------------------------
    1.34+
    1.35+Here is a list of the most commonly used templates and include files with their corresponding descriptions.
    1.36+
    1.37+Include:
    1.38+
    1.39+* top_bar.inc: The thin header at the top of every page, usually contains static links to other related sites or anything else you like.
    1.40+* footer.inc: Similar but at the bottom of every page, by default  includes a link to the user login page.
    1.41+* headers.inc: Raw html headers to be included inside <head> tag.
    1.42+
    1.43+Templates:
    1.44+
    1.45+* default_master.tpl: This is the main template, which calls all the sidebar and other handlers and applications, usually you won't need to edit it unless you want to make changes to the layout or similar dramatic changes.
    1.46+* sitemap.tpl: Template for the sitemap page.
    1.47+* 404.tpl: Template for 'File Not Found' pages.
    1.48+
    1.49+
    1.50+See also
    1.51+--------
    1.52+
    1.53+* [CSS style sheets customization](css_style).