Why is this useful? Well, there are times when you want a consistent look and feel for certain types of items. For example, if you have a list or table, you might want certain fields to have a certain appearance. At DaleBookList we have a list of books and authors, with some publishers. Here's what a typical entry looks like:
If the plugin is installed, and you have defined the style classes for 'booktitle', 'author', and 'publisher', the list item looks good. If you have the plugin installed, but don't have the style classes defined, then the list item looks, well, normal. If you don't have the plugin installed then you see all the parentheses and style names.
More generally, the style plugin lets you get away from the "let's make this bold and that italic" kind of formatting. Instead you can focus on semantic labelling of content and let the css stylesheet take care of the presentation.
Use "\n---[.yourstylename ... \n---]"
This will produce
<div class=yourstylename> ... </div>
Use "((yourstylename)(a chunk o' text))
This will produce
<span class=yourstylename> a chunk o' text</span>
Use ".yourstylename\nyour text"
This will produce
<p class=yourstylename> your text
Use '\n---"( your quoted material \n---")
This will produce
<blockquote>your quoted material</blockquote>
For example:
((acronym)(CSS)(Cascading Style Sheet))
This will produce
<acronym title="Cascading Style Sheet">CSS</acronym>
Plugin settings are stored as preferences variables. To reference
a plugin setting write %<plugin>_<setting>%
, i.e. %STYLEPLUGIN_SHORTDESCRIPTION%
data/debug.txt
)
Note: You do not need to install anything on the browser to use this plugin. The following instructions are for the administrator who installs the plugin on the server where TWiki is running.
StylePlugin.zip
in your twiki installation directory. Content: File: | Description: |
---|---|
data/TWiki/StylePlugin.txt | NEW |
lib/TWiki/Plugins/StylePlugin.pm | NEW |
configure
in your TWiki installation, and enable the plugin in the {Plugins} section.
Plugin Author: | TWiki:Main.DaleBrayden![]() |
Copyright: | © 2002-2003 TWiki:Main.DaleBrayden![]() © 2007-2011 TWiki:TWiki.TWikiContributor ![]() |
License: | GPL (GNU General Public License![]() ![]() |
Plugin Version: | 2011-01-12 |
Change History: | |
2011-01-12: | TWikibug:Item6530![]() ![]() |
2003-03-09: | Added SITESTYLES variable |
2002-12-26: | Initial version |
CPAN Dependencies: | none |
Other Dependencies: | none |
Perl Version: | 5.0 |
Plugin Home: | http://TWiki.org/cgi-bin/view/Plugins/StylePlugin![]() |
Feedback: | http://TWiki.org/cgi-bin/view/Plugins/StylePluginDev![]() |
Related Topics: TWikiPreferences, TWikiPlugins
|
Copyright © 1999-2025 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding Daya Bay? Send feedback Note: Please contribute updates to this topic on TWiki.org at TWiki:TWiki.StylePlugin. |