Recent Changes - Search:

Cookbook

PmWiki

pmwiki.org

ModuleGuidelines-Talk

PmWikiDeveloper
BlogIt /
DeveloperDocs  Developer Documentation for BlogIt. (a work in progress)
Category /
PmWikiInternals  
Cookbook /
ComplexRecipes  Guidelines for people who want to share complex cookbook recipes with other PmWiki user
CookbookBasics  Explains what the cookbook and its recipes are.
DebuggingForCookbookAuthors  Share tips and tricks with other authors about PmWiki specific debugging (perpetual)
Functions  Brief description of some of PmWiki's internal functions available to cookbook recipe authors and custom markup developers
JavaScript  Embed (static) JavaScript into wiki pages (Stable)
LinkedResourceExtras  Linked resource helper functions and scripts for recipe writers (Beta)
ModuleGuidelines  Guidelines for creating, distributing, and maintaining a recipe for the Cookbook.
ParseArgs  Description of ParseArgs function for parsing argument lists (Stable)
PmWikiDeveloper  PmWiki developer documentation
PmWiki /
CustomActions  Make PmWiki respond to custom values for url parameter ?action=...
CustomMarkupAlt  Alternate introduction to custom markup for beginners
FunctionList  A simple list of the functions provided by PmWiki
UpdatePage  Techical notes on the UpdatePage function
PmWikiDe /
CustomActions  Lasse PmWiki selbstdefinierte Werte im Url-Wert 'action=...' verarbeiten
MarkupWriting
Cookbook /
Content  API to create external pages dependent upon text in a wiki page. (Bug fixes, referencing content from other pages)
Functions  Brief description of some of PmWiki's internal functions available to cookbook recipe authors and custom markup developers
MarkupRulesetDebugging  Debugging Markup Ruleset
ParseArgs  Description of ParseArgs function for parsing argument lists (Stable)
QuickReplace  Quickly define replacement texts in wiki pages, and use them as markup or during page save. (Testing)
SchrootConverter  Converter that uses Schroot to execute commands for the Content recipe (First Release)
ShortCutsMarkup  Gives easy access to creating some types of custom markup. (Working)
SourceHistory  Web php programming abilities from computers without any editor installed (beta)
Summary: Discussion of ModuleGuidelines
Version: 2007-04-14
Status:
Maintainer:

This is a talk page for improving ModuleGuidelines.

Additional base recipe components

Another useful line to add to every recipe is

# declare $Package for (:if enabled $Package:) recipe installation check
global $Package; $Package = 1;

Layout

Layout variables allow substitutions and additions to the page template.

CSS

$HTMLHeaderFmt can be used to reference external CSS files (recommended).

CSS can be included directly into the page using $HTMLStylesFmt.

For example if the recipe includes a package.css file, which is presumably placed in the /pub/css/ directory, the following lines would enable it in the page HTML header:

$HTMLHeaderFmt ['package-css'] = 
  "<link rel='stylesheet' type='text/css' href='\$PubDirUrl/css/package.css' />\n";

To include the CSS file only when the recipe is used (ie not for every page of the wiki), and only once (ie not for every time the markup is used in a page), place the following in the function that is called by the Markup function

# include the CSS file in the PmWiki page if required
static $css_generated = false;           // stylesheet not added to page
if (! $css_generated) {
  global $HTMLHeaderFmt;                 // reference the PmWiki HTMLHeaderFMT array
  $HTMLHeaderFmt ['package-css'] = 
    "<link rel='stylesheet' type='text/css' href='\$PubDirUrl/css/package.css' />\n";
  $css_generated = true;                 // remember the stylesheet was added to the page
  };

Talk page for the Module Guidelines recipe (users?).

Edit - History - Print - Recent Changes - Search
Page last modified on September 10, 2011, at 11:42 AM