-
Notifications
You must be signed in to change notification settings - Fork 0
Configuration Options
postpostmodern edited this page Sep 12, 2010
·
8 revisions
- Type: array
- Location: master, page
- Used by: actions, anything
- Description: The vars array gives you a place to put any kind of configuration variable. You can define vars in the master.yaml and override them in the page-specific config. When you run one or more actions before loading a page (see action & actions), the vars array is used as the input and output for the action function. The vars array is available within all templates (.part) and content files (.page) via the $vars variable.
- Type: string
- Location: master, (occasionally page)
- Used by: title()
- Description: This is where you set a site-wide title tag. If a page is missing a title in its configuration, the site_title is used. If both site_title and title are set, the site_title gets appended to the end of the title, separated by a separator character (colon [:] by default).
- Type: string
- Location: master
- Default: home
- Used by: phooey system
- Description: This is the page that is displayed at the root of the site (e.g. http://example.com/). It is used as the home page. By default, Phooey will serve up a page named home. If you’d rather use something else as your home page (maybe a temporary home page called temp), set the home_page configuration option in the master.yaml.
- Type: array
- Location: master, page
- Used by: css_tags()
- Description: The css array lets you list css files to be included in the head of the page. Each element in the css array can be a string indicating the name of the file to include, or it can be an array. In the case of an array, the first element is the name of the css file. The second element is the media (all, print, screen, etc).
- Type: hash
- Location: master, page
- Used by: css_tags()
- Description: This is like the css array, but it is used for IE only via conditional comments. The hash key is the css file name. The hash value is the condition. E.g. ie_styles.css: lte IE6 includes the /css/ie_styles.css file and restricts it to versions of IE less than or equal to version 6. Media-types for IE-specific stylesheets is not currently supported.
- Type: array
- Location: master, page
- Used by: js_tags()
- Description: Like the css array, the js array lets you list js files to be included in the head of the page. Each element in the js array is a string indicating the name of the file to include.
- Type: string
- Location: master
- Used by: google_analytics()
- Description: Including a Google Analytics id here (e.g. UA-1111111-1) will allow you to put Google Analytics tracking code into the page.
- Type: array of arrays
- Location: master, (occasionally page)
- Used by: js_tags()
- Description: You can easily include one or more Javascript frameworks via Google by setting this option. The array should contain one or more 2-element arrays designating the library and version number. Example:
jsapi:
- [ jquery, 1.2 ]
- [ swfobject, 2.1 ]
See http://code.google.com/apis/ajaxlibs/documentation/ for more info.
- Type: hash
- Default: { rating: general, MSSmartTagsPreventParsing: true }
- Location: master, page
- Used by: meta_tags()
- Description: This is a list of meta tag info that will be included in the document head. For each element in the hash, a meta tag is produced where the key is the name attribute and the value is the content attribute. Common things to include here are: description, keywords, author, and copyright. To change the defaults, set them in your yaml file. To remove them, set their values to an empty string.
- Type: hash
- Default: { Content-Type: text/html; charset=utf-8, Content-Language: en-us, imagetoolbar: no }
- Location: master, page
- Used by: meta_tags()
- Description: Just like meta above, but these values output the ‘http-equiv’ type meta tags instead of the ‘name’ meta tags. These are special meta tags that virtually act as server response headers.
- Type: string
- Default: default
- Location: page, (occasionally master)
- Used by: phooey system
- Description: The template is an array of .part files (minus the .part extension) listed in the order in which they should be rendered before output. In addition to the .part file names, you will usually include the word CONTENT which is where the actual content (from the .page file) gets rendered.
- Type: string
- Location: page (don’t put this in master!)
- Used by: phooey system
- Description: Setting redirect to any page, URL, etc. will automatically redirect the browser using a Location header. This is often useful when creating a parent stub under which many subpages will reside. If you don’t want the parent stub to be an actual page, you can just have it redirect to the first child (subpage).
- Type: string
- Location: page, (occasionally master)
- Used by: phooey system
- Description: This is kind of like having a controller in an MVC pattern. If you want a function to be executed before the page is rendered, include the name of the function here. The function should be defined in the lib/actions.php file and should take one parameter (the $vars array) and return one parameter (the $vars array). So, whatever your action does, its results will reside in the $vars array accessible to your “view” (.page and .part files).
- Type: array
- Location: page, (occasionally master)
- Used by: phooey system
- Description: Same as action, but an array listing several actions in order of execution. Let’s see your traditional MVC controller do that!
- Type: string
- Location: master, page
- Used by: phooey system
- Description: The query string is a way of naming get variables passed via a pretty url. The idea is that anything after /get/ in the url of a Phooey page gets treated as a slash (/) separated list of values that end up in the $vars array. To name these values, set up your querystring option to match. Thus, a querystring value of post_id/comment_id would make the URL http://example.com/blog/get/42/23 take you to the blog page where $vars[‘post_id’]=42 and $vars[‘comment_id’]=23.
- Type: boolean
- Default: true
- Location: master, page
- Used by: phooey system
- Description: By default all content text (in your .page files) is evaluated as PHP. If your content files are edited by others (as in the eventual CMS version of Phooey) it’s more secure to set this to false.
- Type: array
- Location: master, page
- Used by: phooey system
- Description: Phooey supports content filters like Markdown, Textile, etc. The value of this option is a list of filter names. For more on content filters, see Content Filters.
- Type: string
- Default: XHTML 1.0 Strict
- Location: master, page
- Used by: doctype_tag()
-
Description: Choose a doctype from the following:
- HTML 4.01 Strict
- HTML 4.01 Transitional
- HTML 4.01 Frameset
- XHTML 1.0 Strict
- XHTML 1.0 Transitional
- XHTML 1.0 Frameset
- XHTML 1.1
- HTML 5
- Type: string
- Default: en
- Location: master, page
- Used by: html_tag() and meta_tags()
-
Description: Declare the language of the page content with a language code (and optionally a subcode) like one of these:
- en
- en-us
- en-cockney