BSE templates documentation
What's a template, what can you do.
With BSE, templates define all the visual aspects of your site.
BSE templates use 3 basic types of tag:
data - gives you access to data from the database
conditional - chooses to produce text or html based on some condition
iteration - repeat a section of text for each element of a list
There are also the <:wrap ... :> and <:embed ... :> tags, which are described under WRAPPING and Embedding tags respectively.
Data tags give you access to the data items that are defined on the current page, many of these tags include parameters so you can select the particular item to display.
A data tag typically looks like:
<: name arguments :>
In some rare cases they can also include formatting information:
<: name arguments |formatting:>
Some data tags are context senstive, for example a level2 tag is only usable inside an <:iterator begin level2 :> ... <:iterator end level2:> block.
Some data tags simply provide formatting, for example the <:money:> tag in the shop pages formats a price as a money value.
Conditional tags let you choose to display different tags depending on a condition. Note that the condition names must already be defined for the page, you cannot test on general conditions.
Each condition tag has two forms:
<:ifName:>I<true-text><:or:>I<false-text><:eif:>
<:if Name:>I<true-text><:or Name:>I<false-text><:eif Name:>
Note that for the short form, there cannot be a space between "if" and the name of the condition, while the long form requires the space.
You must always use the long form if there is another conditional tag in the true-text or false-text.
In the tag documentation below you will find two types of tags that can be used as condition names:
tags explicitly documented as conditional tags. These typically test some mildly complex condition.
true or false data tags. You can use an data tag as a conditional tag. If the result of the data tag is '0' or empty then the condition is false, and the false-text will be displayed, otherwise the true-text is displayed.
Iterator tags step through a list of items, often articles, and repeats the content for each item in the list. There is usually some data tag that gives access to the current item in the list.
An iterator tag can have two forms:
With a separator block:
<:iterator start I<name>:> I<repeated-content> <:iterator separator I<name>:> I<separator> <:iterator end I<name>:>
and without:
<:iterator start I<name>:> I<repeated-content> <:iterator end I<name>:>
If the separator is present, then the copies of repeated-content are separated by separator.
Make sure you have:
<:embed start:>
and:
<:embed end:>
surrounding that part of the article you want embedded in the parent.
If you don't want the child article embedded at all, then:
you have an <:embed child:> which isn't protected by an <:if UnderThreshold:> conditional tag, or
you have too high a threshold in the parent article, or
you shouldn't be using <: embed child :> at all in the parent.
If you find a tag is not being replaced, you most likely have either a nesting problem on the tag, or a spelling error, for example:
<:if UnderThreshold:> <:or UnderThreshold:> <:eif UndreThreshold:>
won't be replaced, since the closing tag has the wrong name.
Also it's not just for matching, sticking with UnderThreshold:
<:if UndreThreshold:> <:or UndreThreshold:> <:or UndreThreshold:>
will be kept as-is on your page, since there is no matching tag.
Another possibility for embedded pages is incorrect nesting of the <:embed start:> ... <:embed end:> tags and other tags, for example:
<:if UnderThreshold:> <:embed start:> ... <:or UnderThreshold:> ... <:eif UnderThreshold:> <:embed end:>
You would end up with spurious <:or UnderThreshold:> and <:eif UnderThreshold:> tags when the article is embedded.
The normal menu tags can currently only produce a menu starting from the top of the article tree.
The way to do this is to use the <: iterator ... children :> tag:
<:iterator begin children:> <a href="<:url child:>"><:child title:></a><br> <:iterator end children:>
Of course, you might want to include reordering tags too:
<:iterator begin children:> <a href="<:url child:>"><:child title:></a><:moveUp:><:moveDown:><br> <:iterator end children:>
Unfortunately, this will include articles which are marked not to appear in menus, so you might want to use:
<:iterator begin children:> <:if InMenu child:> <a href="<:url child:>"><:child title:></a><:moveUp:><:moveDown:><br> <:or InMenu:><:eif InMenu:> <:iterator end children:>
Wrapping can be used by your templates to simplify creating a single look for your site.
You can create a basic template than includes only content and formatting specific to that content, and then wrap that with a template that includes the top, side and bottom bars for your site, with normal tag substitution occurring in the new composite template.
This also allows you to design the whole base template without having to deal with small parts of the layout, which a component based system may force you to.
You need two tags to wrap one template with another:
Insert "<:wrap wrapper:>" at the top of the template to be wrapped around, where wrapper is the name of a template in the template directory. This should include the .tmpl if any.
Put "<: wrap here :>" the template file specified above, at the location where the calling template should be inserted.
The wrapping template may also include a <:wrap wrapper:> tag, in which case the template is wrapped again. This can be repeated several times (there is a limit to prevent self-recursion using all of memory.)
From BSE 0.10 the embed tag can now embed any article, including articles specified by their id, and possibly using other than their normal template. If can understand this section you should be able to apply that to embedding other articles.
Embedding allows you to embed the contents of child articles within the display of the current article. This can be used on a home page to present short (or long) current articles, or to simply present all articles within a section inline, when there are few enough articles that a simple index is just too short.
All article embedding is controlled by the templates. If you find that you're are getting all of the layout of a child page embedded into the parent page, then it's a template problem, not an article data problem.
To embed the current child article (within an <<:iterator begin
... end>:
> block), use:
<:embed child:>
This will be replaced by the rendered content of the child article.
Of course, in most cases you don't want the entire child article rendered within the parent. To limit the content that is embedded within the parent use:
<:embed start:> I<embedded-content> <:embed end:>
You can also test within the template as to whether or not the current article is being embedded with another article:
<:if Embedded:> I<rendered-if-embedded> <:or Embedded:> I<only-if-not-embedded> <:eif Embedded:>
Of course, if you put the <:embed start:> ... <:embed end:> tags within the rendered-if-embedded text then the content displayed for the embedded article can be completely different from when the article isn't embedded.
Each article includes a threshold which can be used with the <:if UnderThreshold:> conditional tag to decide whether or not to embed child articles.
For example a section page might have:
<:if UnderThreshold :> <!-- embed the children --> <:iterator begin children:> <:embed child:> <:iterator separator children:> <hr> <:iterator end children:> <:or UnderThreshold:> <!-- summarize the children --> <:iterator begin children:> <p><b><a href="<:url child:>"><:child title:></a></b></p> <p><:summary:></p> <:iterator separator children:> <br> <:iterator end children:> <:eif UnderThreshold:>
To maintain the association between a level of your site and the type of content it contains, eg. that articles are at level 3, you can have one level embed within another, that then embeds with the level above that.
This allows you to have the look of having level 3 items directly within level 1 items without having to mix templates between levels.
To do this:
Create a level 1 template that includes the following:
<:iterator begin children:> <:embed child:> <:iterator end children:>
You will want to include extra formatting :)
Note that this child iterator will only include a single level2 article.
Create a level2 template that contains:
<:embed start:> <:iterator begin children:> <:moveUp:><:moveDown:> <:embed child:> <:iterator end children:> <:embed end:>
You may want to include extra formatting within the child iterator.
You may also want to use thresholds to choose whether to include the article content or a summary and link:
<:embed start:> <:if UnderThreshold:> <:iterator begin children:> <:moveUp:><:moveDown:> <:embed child:> <:iterator end children:> <:or UnderThreshold:> <:iterator begin children:> <p><b><a href="<:url child:>"><:child title:></a></b></p> <:summary:> <:iterator end children:> <:eif UnderThreshold:> <:embed end:>
Create the level 1 article that will include multiple levels, and set it's template to the template you created in step 1.
You could also modify an existing article.
Create the level 2 article, settings it's parent to the level 1 article you created in step 3 and using the template you created in step2.
Set the "List article" option of this level 2 article to "In sections, but not menu".
So now if you add new level 3 articles to your level 2 article above, they will appear inline to the level 1 article.
In general, page templates can be kept in any directory under the configured $TMPLDIR, but the article editing pages look for templates in certain locations, and some template names are special:
search_base.tmpl is used to generate menus and possibly other generic content into search.tmpl, the advanced search page (used by cgi-bin/search.pl)
cart_base.tmpl, checkout_base.tmpl, checkoutpay_base.tmpl and checkoutfinal_base.tmpl are used to generated menus and other generic content into cart.tmpl, checkout.tmpl, checkoutpay.tmpl and checkoutfinal.tmpl respectively.
These are the shopping cart, checkout page, payment and completed order pages respectively, used by cgi-bin/shop.pl.
The article administration interface displays lists of articles based on the level of the article, and in some cases the type of article.
The templates for normal articles are kept in 2 places, the common directory and the a numbered directory based on the level of the article, eg. level 1 templates can also be found in directory 1 under the template root.
Template names for shop catalog pages can be any .tmpl file in the catalog directory or catalog.tmpl.
Template names for products can be any .tmpl file in the products directory or shopitem.tmpl.
The templates used for editing articles are kept in admin/edit_level.tmpl, you shouldn't need to modify these, unless you need to limit what your site administrators can do.
The home article is also presented with index.tmpl as a choice, if it's present, and it's child is presented with index2.tmpl as a choice if it's present.
Tags are documented without the <: and :>.
If a tag is documented as <iterator ...name
> then it's an iterator
tag and can be used:
<:iterator begin I<name>:> I<repeated-text> <:iterator separator I<name>:> I<repeated-text> <:iterator end I<name>:>
Some tags have a which parameter. For these tags which can be
any other tag which is valid for the current page which retrieves
article or product attributes, such as section
, parent
or
article
itself.
These tags can be used anywhere, including in admin templates. It's possible some admin code has been missed, if you find a place where these cannot be used let us know.
Formats the give value in kwhatevers. If you have a number that could go over 1000 and you want it to use the 'k' metric prefix when it does, use this tag. eg. <:kb file sizeInBytes:>
Formats a date or date/time value from the database into something more human readable. If you don't supply a format then the default format of "%d-%b-%Y" is used ("20-Mar-2002").
The format is a strftime()
format specification, if that means
anything to you. If it doesn't, each code starts with % and are
replaced as follows:
abbreviated weekday name
full weekday name
abbreviated month name
full month name
"preferred" date and time representation
day of the month as a 2 digit number
hour (24-hour clock)
hour (12-hour clock)
day of year as a 3-digit number
month as a 2 digit number
minute as a 2 digit number
AM or PM or their equivalents
seconds as a 2 digit number
week number as a 2 digit number (first Sunday as the first day of week 1)
weekday as a decimal number (0-6)
week number as a 2 digit number (first Monday as the first day of week 1)
the locale's appropriate date representation
the locale's appropriate time representation
2-digit year without century
the full year
time zone name or abbreviation
just '%'
Your local strftime()
implementation may implement some extensions to
the above, if your server is on a Unix system try running "man
strftime" for more information.
Formats the text from the given tag in the same way that body text is.
Checks if the 2 values are exactly equal. This is a string comparison.
The 2 data parameters can either be a tag reference in [], a literal string inside "" or a single word.
Treats data2 as a perl regular expression and attempts to match data1 against it.
The 2 data parameters can either be a tag reference in [], a literal string inside "" or a single word.
Retrieves a value from the BSE configuration file.
If you don't supply a default then a default will be the empty string.
The release number of BSE.
Returns the sum of all of the numbers provided. You can use the [tag ...] construct to insert the values of other tags.
Returns the concatenation of all of the strings provided. You can use the [tag ...] construct to insert the values of other tags.
Matches regexp against the given string, if the match does not succeed then default is returned.
On match $digit in output is replaced with the text matched by the digitth set of parentheses in the pattern. Only $1 through $9 is replaced, there is no support for $10 and so on. $$ is replaced with $.
regexp and output should not be user supplied strings.
Replaces the first instance of regexp in string with with
where $digit in with is replaced as for the match
tag.
with defaults to $1
.
If global is present and non-zero then every instance of regexp is replaced.
regexp and with should not be set to user supplied strings.
Does the same thing as the corresponding perl function, lowercasing string, uppercasing string, lowercasing the first letter of string and upper-casing the first letter of string respectively.
Converts the first letter of every word in string to uppercase.
Iterates over the key definitions in a section of the configuration
file. Possible values for field are key
or value
. The section
name must be quoted with double quotes.
Inserts a help icon in the text. By default this will link to /help/topic.html#entry, but this can be modified by the configuration depending on the style. The default style is "user".
These can be used on any dynamically generated page.
The CGI SCRIPT_NAME value
Extracts the value of the given CGI field. If more than one value is supplied for the CGI field then all values are returned with spaces between them.
Returns the CGI parameter field if supplied, otherwise calls tag func with args as arguments and returns that value.
This is meant to be used as the value="" parameter in input tags.
Returns the indexth CGI value named field. If that doesn't exist then tag func is called with args and returns that value.
A field from the currently logged in user if any.
Test if there is a user logged on.
Check if the currently logged on user can see the given article.
Iterate over visible level 1 articles.
Iterate over visible level 2 articles that are children of the current dynlevel1.
Iterate over visible level 3 articles that are children of the current dynlevel2.
Iterate over visible children and stepchildren of the given articles.
Iterate over visible direct children of the given articles.
Iterate over the user's shopping cart. dyncartitem fields include units, options, extended and all product fields.
Total cost off all items in the user's shopping cart, in cents.
Total number of items in the user's shopping cart.
Test if the given user is a member of a given user group.
These tags can be used in any article, catalog, product or pre-generated template, such as the checkout or search template.
Conditional tag, true if generating in admin mode.
Iterates over the listed level 1 articles.
The value of the name field of the current level 1 article.
Iterates over the listed level 2 children of the current level 1 article.
The value of the name field of the current level 2 article.
Conditional tag, true if the current level 1 article has any listed level 2 children.
Iterates over the listed level 3 children of the current level 2 article.
The value of the name field of the current level 3 article.
Conditional tag, true if the current level 2 article has any listed level 3 children.
Returns a link to the specified article . Due to the way the action
list is built, this can be article types defined in derived classes of
Generate, like the parent
article in Generate::Article.
Formats the given value as a monetary value. This does not include a currency symbol. Internally BSE stores monetary values as integers to prevent the loss of accuracy inherent in floating point numbers. You need to use this tag to display any monetary value.
Conditional tag, true if the given item can appear in a menu.
Generates an IMG tag if the given imagename is in the title image directory (titles in the configured image directory). If it doesn't exists, produces the text.
Embeds the article specified by which using either the specified template or the articles template.
In this case which can also be an article ID.
template is a filename relative to the templates directory. If
this is "-" then the articles template is used (so you can set
maxdepth without setting the template.) If template contains a
$
sign it will be replaced with the name of the original template.
If maxdepth is supplied and is less than the current maximum depth then it becomes the new maximum depth. This can be used with ifCanEmbed.
Marks the range of text that would be embedded in a parent that used
embed child
.
Conditional tag, true if the current article is being embedded.
Access to fields of the article. See Article attributes.
Access to fields of the parent article. See Article attributes.
Conditional tag, true if there is a parent.
Access to the fields of the section containing the article. See Article attributes.
The title of the article presented as an image if there is a titleImage or as text. See Tag notes for values for which.
Conditional tag, true if the given article has a titleImage,
The thumbnail image as an <img> tag for object which where which is one of the article objects defined. The optional class adds a class attribute to the tag with that class.
Conditional tag, true if the article specified by which has a thumbnail.
Conditional tag, true if the number of children/stepkids/allkids is less or equal to the article's threshold.
The formatted body of the article.
You can use the following formatting within the body of an article:
Inserts a link with title that points to url.
The text is formatted in bold.
The text is formatted in italics.
The text is formatted as a paragraph aligned to the left, right or center (not the US spelling of center).
Formats the text at the given size, a number from 1 to 7, or a relative size like -2 or +1.
Inserts a horizontal rule. Width is either in pixels ("100") or a percentage ("50%"). Height should be in pixels. If either is omitted the HTML or style-sheet default is used.
Creates a local link target called name. Use link[#name|title] to link to it.
Formats a table. Options are either | separated table width, bgcolor, cellpadding, font size and font face, or raw html table attributes.
Each row is a single line:
options|column 1|column 2 ...
Where the options are raw HTML tr attributes.
An example:
table[ |b[x]|b[x*x] |1|1 |2|4 |3|9 ]
Formats a single cell table. The options can be either | separated values as for the multi-line table[] tag, or raw HTML table options.
table[80%|#FF8080|Hello]
The text is formatted with bullets. Eg.
** This will have a bullet at the left ** So will this.
The text is formatted as part of a numbered list:
## the first line ## the second line
is presented as:
1. the first line 2. the second line
Embeds the article given by which, which may be a symbolic name like "section" or an article id as a number.
Make sure you don't create a loop where an article embeds itself or embeds another article that embeds the current article (or bigger loops). This is handled with an error message in the page.
Iterates over the ancestors of the article. See the item crumbs.
option can be empty, "listedonly" or "showtop". If empty the display of an unlisted level1 ancestor is controlled by $UNLISTED_LEVEL1_IN_CRUMBS, if "listedonly" then an unlisted level1 article isn't shown in the crumbs, and it is if "showtop" is the option. This can be used in <: ifCrumbs :> too.
Access to the fields of the specific ancestor. name can be any of
the Article attributes. crumbs
is now deprecated, use crumb
where possible.
Conditional tag, true if there are any crumbs.
Conditional tag, true if the article has any children.
Iterates over the children of the article. See the item child.
Access to the fields of the current child.
Produces a processed summary of the current child's body.
Conditional tag, true if there is a previous child. Originally used for generating a move up link, but you can use the moveUp tag for that now.
Conditional tag, true if there is a next child. Originally used to generating a move down link, but you can use the moveDown tag for that now.
This has been made more general and been moved, see embed in the Generate manpage.
Conditional tag, true if the given which is the page currently
being generated. This can be used to apply special formatting if a
level1
or level2
article is the current page.
Iterates over the unnamed images for the given article.
Iterates over all images for the article.
Iterates over the named images for the article.
Iterates over images with names matching the given regular expression. Note that if the expression matches an empty string then unnamed images will be included.
Extracts the given field from the specified image.
which in this can be either an image index to access a specific image, or "-" to access the current image in the images iterator.
The image fields are:
The identifier of the article the image belongs to.
A partial url of the image, relative to /images/.
Alternative text of the image.
dimensions of the image.
the url if any associated with the image
Produces HTML to render the given image.
which can be an image index (1, 2, 3...) to select one of the
images from the current article, or '-' or omitted to select the
current image from the images iterator. If align is present then the
align
attribute of the image is set.
If the image has a URL that <a href="...">...</a> will also be generated.
Condition tag, true if an image exists at the given index.
Conditional tag, true if the article has any images.
Conditional tag, true if the article has any named images.
Conditional tag, true if the article has any named images, where the name matches the regular expression.
Conditional tag, true if the article has any unnamed images.
Inserts a thumbnailed version of the given image, or a field from the image if the field parameter is supplied.
image can either be an image name, '-' for the current image in the images or gimages iterator or an image number for thumbimage.
Tests if the article is dynamically generated.
Tests if the article is access controlled.
Toplevel article being generated. This is the page that any articles are being embedded in.
Iterates over the files attached to the article, setting the file tag.
Information from the current file in the files iterator.
The file fields are:
id - identifier for this file
articleId - article this file belongs to
displayName - the filename of the file as displayed
filename - filename of the file as stored on disk,
sizeInBytes - size of the file in bytes.
description - the entered description of the file
contentType - the MIME content type of the file
displayOrder - number used to control the listing order.
forSale - non-zero if the file needs to be paid for to be downloaded.
download - if this is non-zero BSE will attempt to make the browser download the file rather than display it.
whenUploaded - date/time when the file was uploaded.
requireUser - if non-zero the user must be logged on to download this file.
notes - longer descriptive text.
name - identifier for the file for filelink[]
hide_from_list - if non-zero the file won't be listed by the files iterator, but will still be available to filelink[].
The following tags produce output only in admin mode.
Produces buttons and links used for administering the article.
This tag can use a specialized template if it's available. If you
call it with a parameter, <:admin template:> then it will use
template admin/adminmenu/template.tmpl
. When used in an
article template <:admin:>
behaves like <:admin article:>
, when used in a catalog template <:admin:>
behaves like <
<:admin catalog:
>>, when used in a product template <:admin:>
behaves like <:admin product:>
. See Admin Menu Templates
for the tags available in admin menu templates.
If the template doesn't exist then the old behaviour applies.
Generates a move up link if there is a previous child for the current child.
Generates a move down link if there is a next child for the current child.
Iterates over the products within this catalog.
The give attribute of the product.
Conditional tag, true if there are any normal child products.
Iterates over the products and step products of this catalog, setting the allprod tag for each item.
The given attribute of the product.
Conditional tag, true if there are any normal or step products.
Iterates over any step products of this catalog, setting the stepprod tag to the current step product. Does not iterate over normal child products.
The given attribute of the current step product.
Conditional tag, true if there are any step products.
Iterates over any sub-catalogs.
The given field of the current catalog.
Conditional tag, true if there are any subcatalogs.
Generates administrative tools (in admin mode).
You can use any article tags as well.
Access to product fields of the product being rendered. This is the
same as the article
field tag for normal articles, but also give
you access to the product fields.
Produces product specific administration links in admin mode.
Iterates over the options available for the product, setting the option tag.
The popup list of values for the current option.
Retrieves the given field from the option. Most commonly you just want the desc field.
<:if Options:> <!-- you might want to start a table here --> <:iterator begin options:> <:option desc:>: <:option popup:> <:iterator end options:> <!-- and end a table here --> <:or Options:><:eif Options:>
Iterates over any step parents of the product, setting the stepcat for each element.
Access to fields of the step catalogs of the parent.
Conditional tag, true if the product has any step catalogs.
These tags are used on the page generated by search.pl, and are found in search_base.tmpl.
Please note that these tags are replace once the actual search is done. The tags defined in Base tags in the templates manpage are replaced when you choose Generate static pages from the admin page.
Iterates over the articles for the current page of results.
Access to fields in the current search result article.
Formats the given field of the tag which for display as a date.
Keywords for the current result article, if any keywords matches the requested search.
Conditional tag, true if the search found any matching articles.
Conditional tag, true if the user entered any search terms.
The date value chosen by the user for the last search. Used in a <select> HTML tag to have the date field select the last value chosen by the user.
An excerpt of the body of the current search result, with search terms highlighted.
A link to the current search result article, taking admin mode into account.
The total number of matches found.
Conditional tag, true if more than one match was found. This can be used to improve the wording of descriptions of the search results.
The entered search terms.
The number of the current search result (ie. the first found is 1, etc).
A drop-down list of searchable sections.
Iterates over page numbers of search results.
The current page number within the page number iterator.
Conditional tag, true if the page in the page number iterator is the displayed page of search results. This can be used for formatting the current page number differently (and not making it a link.)
A link to the current page in the page number iterator.
An example
... <input type=text name=s value="<:terms:>"> ...
<:if Search:> <:if Results:> <dl> <:iterator begin results:> <dt><:resultSeq:> <a href="<:article url:>"><:article title:></a> <dd><:excerpt:> <:iterator end results:> </dl> <:iterator begin pages:> <:if CurrentPage:> <b><:page:></b> <:or CurrentPage:> <a href="<:pageurl:>"><:page:></a> <:eif CurrentPage:> <:iterator separator pages:> | <:iterator end pages:> <:or Results:> No articles matches your search. <:eif Results:> <:or Search:> <:eif Search:>
Iterates over the items in the shopping cart, setting the item
tag
for each one.
Retreives the given field from the item. This can include product fields for this item.
The numeric index of the current item.
Produces an extended price, ie. the given field of the curren cart
item times the number of units. The default field is the unit
price. This should be formatted using the money
tag.
Formats the given field as a money value (without a currency symbol.)
The number of items in the cart.
This has the same tags as the Cart page, and some extras:
The total cost of all items in the cart.
This will need to be formatted as a money value with the money
tag.
An error message, if a validation error occurred.
The previously entered value for field. This should be used as the value for the various checkout fields, so that if a validation error occurs the user won't need to re-enter values.
An estimate in days for delivery. May look like "1" or "1 or 2" if it is available at all.
The cost of shipping by the selected shipping_method, if available.
The selected shipping_method, if any.
These tags are used in the checkoutfinal_base.tmpl.
This is split out for these forms.
Order fields.
You can also use "|format" at the end of a field to perform some simple formatting. Eg. <:order total |m6:> or <:order id |%06d:>.
Formats the value as a <number> wide money value.
Performs sprintf()
formatting on the value. Eg. %06d will format 25
as 000025.
These tags are used in the emails sent to the user to confirm an order and in the encrypted copy sent to the site administrator:
Iterates over the items in the order.
Access to the given field in the order item.
Access to the product field for the current order item.
Access to fields of the order.
The product of the field in the current item and it's quantity.
Formats the given field as a money value.
The mail generation template can use extra formatting specified with '|format':
Format the value as a number wide money value.
Performs sprintf formatting on the value.
Left justifies the value in a number wide field.
The order email sent to the site administrator has a couple of extra fields:
The credit card number of the user's credit card.
The entered expiry date for the user's credit card.
These tags can be used in the templates included by the <:admin:>
tag.
The basic template tags and ifUserCan tag can be used in admin menu templates.
Retrieves a field from the current article.
Retrieves a field from the parent of the current article.
Conditional tag, true if the current article has a parent.
Conditional tag, true if the current article is embedded in another article, in this context.
Identifies the article.
The identifier of the parent article.
The title of the article. See the title tag
The name of the title image for the article, if any. See the title and ifTitleImage tags.
The body of the article. See the body tag.
The thumbnail image for the article, if any. See the thumbnail tag.
The release and expiry dates of the article.
Any keywords for the article. Indexed by the search engine.
Links to the normal and adminstrative versions of the article. The url tag defined by Generate.pm will select the appropriate tag for the current mode.
The maximum number of articles that should be embeded into the current article for display. See the ifUnderThreshold tag.
The maximum amount of text displayed in the summary of an article. See the summary tag.
The class used to generate the article. Should be one of Generate::Article, Generate::Catalog or Generate::Product.
The level of the article. Sections are level1, etc
How the article is listed. If zero then the article can only be found in a search. If 1 then the article is listed in menus and article contents, if 2 then the article is only listed in article contents.
When the article was last modified. Currently only used for display in search results.
Set the the current admin user logon if access_control is enabled in the cfg.
Set to the current date time when a new article is created.
Set to the current admin user logon if access_control is enabled in the cfg.
A user definable field for attributing the article author.
An alternate article title which can be used to make search engine baited oage titles.
Article metadata description, used as metadata in the generated HTML output.
Article metadata keywords, used as metadata in the generated HTML output.
The following attributes are unlikely to be used in a page:
Used internally to control the ordering of articles within a section.
The position of the first image in the body. The body tag will format images into the body as specified by this tag.
The template used to format the article.
Flags which can be checked by code or template tags to control behaviours specific the the article.
Forces a page to be displayed dynamically with page.pl regardless of access control.
Controls whether the article inherits its parents access controls.
An in-between length description of the article for use on the catalog page.
The number of days it takes to receive the product after it has been ordered.
The cost to the customer of the product. You need to use the money
tag to format this field for display.
Your cost. You need to use the money
tag to format this field for
display.
The GST (in Australia) payable on the product.
The order id or order number.
Delivery information for the order.
Billing information for the order.
Contact information for the order.
Total price of the order.
Wholesale cost of the total. Your costs, if you entered wholesale prices for the products.
GST (in Australia) payable on the order, if you entered GST for the products.
When the order was made.
The product id of this item.
The order Id.
The number of units for this item.
The price paid for the product.
The wholesale price for the product.
The gst for the product.
Whether or not the order has been filled. This can be used with the order_filled target in shopadmin.pl for tracking filled orders.
The time and date when the order was filled.
The user who marked the order as filled.
Whether or not the order has been paid for. This can be used with a custom purchasing handler to mark the product as paid for. You can then filter the order list to only display paid for orders.
A custom payment handler can fill this with receipt information.
Generated by the prePurchase target, this can be used as a difficult to guess identifier for orders, when working with custom payment handlers.
This can be used by a custom payment handler to mark an order as cancelled if the user starts processing an order without completing payment.
Currently, template replacement is done using simple regular expressions, which can be a problem for nested <:if ...:> tags.