edit this page - page history - about editing

style formatting


Part of Journals Help.

Basics

When the Journals is constructing your pages, entries and styles, it uses a system of template formatting. It replaces variables in the template with ones specified by the system, to generate the content you see.

For example, an entry template might look like this:

<h1>{entry-title}</h1>
{content}
{thoughts}

When the system goes through this template, it may have the following values in memory:

entry-title = My First Entry
content = Hello everybody! This is my first entry.
thoughts = (thoughts links)

And it will replace it like so:

<h1>My First Entry</h1>
Hello Everybody! This is my first entry.
(thoughts links)

Simple, isn't it? For more information on how styles work, see How Styles Work and the documentation for the Style Editor. You don't have to use styles to have a pretty journal - have a look at the Colour Scheme Editor and the Layout Editor too.

Advanced

To find out what codes are available at a certain style, you can either look at the Style Editor documentation, or by inserting the special code tag {#all}, you can see the values for every component at once. (See an example of #all.)

Some extra values are available:

{#color_code} will specify a colour code, either from your style or from the default style.
{#this-url} will return the current URL request.
{#this-referer} will return the location the user has came from (the referer page).
{#this-user} will return the username of the current user.
{#rel} will return a URL to the home page of the Journals.

You can also use special formatting tags on the template values:

{h:code} will remove all HTML tags in the code.
{u:code} will make the code usable in an URL.
{n:code} will format the code as a number (with commas seperating thousands).
{f:code} will format the code as a number, with two decimal points.

In some cases, you can also use default values in your templates. For an example of this, check out how to Include Pages on the Music Wiki.
Categories: Journals | Styles

edit this page - what links to here? - page history - top
Last edited by jevon jevon 110 months ago
All lyrics are the properties of their original authors.

All code and intellectual property is copyright © Jevon Wright 2005.