Roxen Interactive RXML Help
<emit></emit>
<emit> is a generic tag used to fetch data from a provided source, loop over it and assign it to RXML variables accessible through entities.
Occasionally an <emit> operation fails to produce output. This might happen when <emit> can't find any matches or if the developer has made an error. When this happens the truth value of that page is set to false. By using <else> afterwards it's possible to detect when an <emit> operation fails.
This tag is cache static (see the <cache> tag) if the compatibility level is set to 2.5 or higher.
Attributes
- source
- source=plugin
This attribute is required.The source from which the data should be fetched.
- scope
- scope=name (The emit source)
The name of the scope within the emit tag.
- maxrows
- maxrows=number
Limits the number of rows to this maximum. Note that it is often better to restrict the number of rows emitted by modifying the arguments to the emit plugin, if possible. E.g. when quering a MySQL database the data can be restricted to the first 100 entries by adding "LIMIT 100".
- skiprows
- skiprows=number
Makes it possible to skip the first rows of the result. Negative numbers means to skip everything execept the last n rows. Note that it is often better to make the plugin skip initial rows, if possible.
- rowinfo
- rowinfo=variable
The number of rows in the result, after it has been filtered and limited by maxrows and skiprows, will be put in this variable, if given. Note that this may not be the same value as the number of emit iterations that the emit tag will perform, since it will always make one iteration when the attribute do-once is set.
- remainderinfo
- remainderinfo=variable
The number of rows left to output, when the emit is restricted by the maxrows attribute. Rows excluded by other means such as skiprows or filter are not included in hte remainderinfo value. The rows counted in the remainderinfo are also filtered if the filter attribute is used, so the value represents the actual number of rows that should have been outputed, had emit not been restriced.
- do-once
Indicate that at least one loop should be made. All variables in the emit scope will be empty, except for the counter variable.
- filter
- filter=list
The filter attribute is used to block certain 'rows' from the source from being emitted. The filter attribute should be set to a list with variable names in the emitted scope and glob patterns the variable value must match in order to not get filtered. A list might look like name=a*,id=??3?45. Note that it is often better to perform the filtering in the plugin, by modifying its arguments, if possible. E.g. when querying an SQL database the use of where statements is recommended, e.g. "WHERE name LIKE 'a%' AND id LIKE '__3_45'" will perform the same filtering as above.
<emit source='values' values='foo,bar,baz' split=',' filter='value=b*'> &_.value; </emit>bar baz
- filter-exclude
- filter-exclude=list
The filter exclude attribute is used to filter out unwanted rows that would otherwise be emitted. Uses the same syntax as the filter attribute.
- sort
- sort=list
The emit result can be sorted by the emit tag before being output. Just list the variable names in the scope that the result should be sorted on, in prioritized order, e.g. "lastname,firstname". By adding a "-" sign in front of a name, that entry will be sorted in the reversed order.
The sort order is case sensitive, but by adding "^" in front of the variable name the order will be case insensitive.
The sort algorithm will treat numbers as complete numbers and not digits in a string, hence "foo8bar" will be sorted before "foo11bar". If a variable name is prefixed by "*", then a stricter sort algorithm is used which will compare fields containing floats and integers numerically and all other values as strings, without trying to detecting numbers etc inside them.
Compatibility notes: In 2.1 compatibility mode the default sort algorithm is the stricter one. In 2.2 compatibility mode the "*" flag is disabled.
- reverse
The results will be output in reverse order.
<emit source='path' path='/path/to/file' reverse=''> &_.path;<br/> </emit>/path/to/file
/path/to
/path
/
Defined in content
-
&_.counter;
Gives the current number of loops inside the <emit> tag, starting from zero.
<delimiter></delimiter>
The content is inserted in the result except in the last iteration through the <emit> tag. It's therefore useful to insert stuff that only should delimit the entries, i.e. not occur before the first one or after the last.
Emit plugin ac-identities
Makes listings of users and groups in the Access Control system.
The different ways of specifying what to list are mutually exclusive.
All <emit> attributes apply.
Attributes
- type
- type={group, user}
List either groups or users. If this attribute is omitted both groups and users will be listed.
- id
- id={number, handle}
As both groups and users has id's this makes it possible to return information of a particular group or user.
- members-of
- members-of={number, handle}
Lists members of the given identity. This is only useful for groups, since user identities contain no members.
- memberships-of
- memberships-of={number, handle}
Lists the memberships of the given identity, i.e. all groups of which this identity is a member. This is the opposite of the members-of attribute.
As both groups and users has id's this makes it possible to return information of a particular group or user.
- search
- search=string
List the users whose name or handle matches the search string. The search is performed by a case insensitive substring match.
- exclude-members-of
- exclude-members-of={number, handle}
Exclude members of the given identity. This filter is applied last, which means that it can be applied in combination with all other search types and that it takes precedence (e.g. identities returned by the members-of attribute can still be filtered if they are members of the group specified here.) This attribute is only useful to specify groups, since user identities contain no members.
Defined in content
-
&_.fullname;
The user's/group's full name.
&_.id;
The user's/group's unique Access Control identification number.
&_.name;
The user's/group's handle/alias, i.e. the username in Access Control.
&_.type;
Returns either group or user.
&_.zone-id;
Zone ID number for this identity.
Emit plugin ac-identity-data
Retrieve arbitrary data stored in an identity with <ac-set-identity-data>.
The returned entities will have the same names as the index given to <ac-set-identity-data>.
A user is always allowed to read this data in her self. If an other user is specified with the identity attribute the normal AC permission checks are used.
<emit source='ac-identity-data'>
Your registered email address is: &_.email;
</emit> |
Attributes
- identity
- identity={string, int}
Username or numerical id of the identity. If no identity is supplied the currently authenticated user will be used.
Emit plugin ac-identity-extras
Retrieve extra info provided by an identity auth method, typically the extra info for users imported from LDAP.
The returned entities will have the names of the field the authentication method provides.
A user is always allowed to read this data in her self. If an other user is specified with the identity attribute the normal AC permission checks are used.
<emit source='ac-identity-extras'>
Your current email address is: &_.email;
</emit> |
Attributes
- identity
- identity={string, int}
Username or numerical id of the identity. If no identity is supplied the currently authenticated user will be used.
Emit plugin captcha
Prepares a captcha and emits needed parameters.
<emit source='captcha'>
<img src='&_.url;' height='&_.image-height;' width='&_.image-width;'/>
<form>
<input type='text' name='response' />
<input type='hidden' name='secret' value='&_.secret;' />
</form>
</emit> |
Defined in content
-
&_.image-height;
The captcha image's height.
&_.image-width;
The captcha image's width.
&_.secret;
Encrypted (hashed) secret that can be sent to clients and should be used together with the captcha response for verification.
&_.url;
URL to the captcha image.
Emit plugin category
This emit plug-in can be used to display category trees with associated links.
If no attributes are given, category trees available in the current directory and all parent directories will be listed by the &_.file; entity.
List of all category trees (files of type CMS Category Tree) in this or any parent directory:
<ul>
<nocache>
<emit source='category'>
<li>&_.file;</li>
</emit>
</nocache>
</ul> |
Complete category tree view:
<define tag='category-listing' scope='list'>
<ul>
<emit source='category'
file='&list.file;' node='&_.node;' category=''>
<li>
&_.name;
<category-listing file='&list.file;' node='&_.node;'/>
</li>
</emit>
<emit source='category'
file='&list.file;' node='&_.node;' related=''>
<li>
<i>Related:</i>
<emit source='category'
file='&list.file;' node='&_.node;' history=''>
&_.name; <delimiter>></delimiter>
</emit>
</li>
</emit>
<emit source='category'
file='&list.file;' node='&_.node;' document=''>
<li>
<i>Document:</i>
<emit source='dir' file='&_.ref;' notitle='yes'>
<a href='&dir.path;'>
<if variable='dir.title is '>&dir.path;</if>
<else>&dir.title;</else>
</a>
</emit>
</li>
</emit>
</ul>
</define>
<ul>
<nocache>
<emit source='category'>
<li>
<p><b>&_.file;</b></p>
<category-listing file='&_.file;' node='&_.node;'/>
</li>
</emit>
</nocache>
</ul> |
Complete category file view:
<ul>
<nocache>
<emit source='category' ref='*'>
<li>
&_.ref;:
<emit source='category'
file='&_.file;' node='&_.node;' history=''>
&_.name; <delimiter>></delimiter>
</emit>
(from &_.file;)
</li>
</emit>
</nocache>
</ul> |
Display node name for a node:
<nocache>
<emit source='category' file='/your-tree.xml' node='your-node-id'>
<p>Node name for &_.node; is &_.name;.</p>
</emit>
</nocache> |
Attributes
- file
- file=category tree file path
Category tree file path.
- ref
- ref=string
Comma-separated list of reference (typically a path) globs.
- not-ref
- not-ref=string
Comma-separated list of reference (typically a path) globs not to include.
- node
- node=node id
Lists categories, relations and/or files associated with a given category node or tree node. The empty value is the same as the tree root node.
- invisible
-
Allows files which are time based published to be listed.
- undelete
-
Allows deleted files to be listed. (Not implemented.)
- history
Lists all super-category node id:s to a given node. Used together with the node attribute.
- category
Provides all sub-category node id:s to a given node list. Used together with the node attribute.
- category-transitive
Recursively provides all sub-category node id:s to a given node list. Used together with the node attribute.
- related
Provides all related category node id:s to a given node list. Used together with the node attribute.
- document
Provides all document paths to a given node list. Used together with the node attribute, and optionally with the ref and not-ref attributes.
Defined in content
-
&_.file;
Category tree file path.
&_.name;
Category name, or category tree name when trees are listed.
&_.node;
Category node id.
&_.ref;
Reference (typically a path).
Emit plugin category-document
This emit plugin returns paths to files in SiteBuilder with one or more categories. The resulting list of paths can be sorted using the standard emit sort attribute, on any of the entities publish, title, path or combinations of these.
Be aware that there may be performance issues using the AND operator together with 1) a big category database table, and 2) multiple node id:s in the nodes="" attribute. In those cases it is recommended that some form of caching is used. The typical example would be when the tag is used to display the latest pages in the news category on a site start page. In this case it is a very good idea to use a cache with a time out.
Sorting on publish and path will be done in SQL and should therefore give good performance. Sorting on title will be done in Pike and all rows must be returned from the database regardless of maxrows/skiprows. The sorting performance will therefore be based on the total number of rows mathing the search criterias. Note that the maxrows/skiprows attributes will still function as expected, only that technically they are used in Pike instead of in the SQL query.
Ex. 1:
List a maximum of 10 paths categorized as
'News' and 'Important' (node id '1205396296-0' and '1205396296-1' respectively)
, allow only paths in '/news/' and '/misc/' and cache the result in 5 minutes:
<cache minutes='5'>
<emit source='category-document'
nodes='categories.xml!1205396296-0,categories.xml!1205396296-1'
operator='and'
path='/news/*,/misc/*'
maxrows='10'
sort='-publish'>
<div>&_.path; <i>(&_.publish;)</i></div>
</emit>
</cache> |
Ex. 2:
List paths 101 - 120 categorized as 'Car' or
'Boat' (node id '1205396296-2' in /categories1.xml or '1205304615-0' in
/categories2.xml respectively), but exclude all paths in '/new/' and
'/newest/', sort on title ascending and publish descending:
<nocache>
<emit source='category-document'
nodes='categories1.xml!1205396296-2,categories2.xml!1205304615-0'
operator='or'
not-path='/new/*,/newest/*'
skiprows='100'
maxrows='20'
sort='title,-publish'>
<div>&_.path; <i>(&_.publish;)</i></div>
</emit>
</nocache> |
Attributes
- operator
- operator={and, or} (and)
and: list files categorized with all node id:s.
or: list files categorized with at least one of the node id:s.
- nodes
- nodes=string
This attribute is required.Comma-separated list of category node id:s to list paths for.
- path
- path=string
Comma-separated list of path globs to include in the list of paths.
- not-path
- not-path=string
Comma-separated list of path globs to exclude from the list of paths.
- invisible
-
Include invisible files in the list of paths.
Defined in content
-
&_.path;
File path.
&_.publish;
Publish date. The date the file was first committed or the external visibility start date if set. Note that this entity may give incorrect results on frontend servers unless the Site News module is active.
&_.title;
The title of the file. Note that this attribute is fetched dynamically and not stored in the database.
Emit plugin cimg
Entitybased version of <cimg>. Takes the same attributes as <cimg>.
Attributes
- nodata
- nodata={yes , no}
Controls suppression of &_.data; in the output. Useful for reducing memory consumption in cached emit tags. The default value is 'no'.
Defined in content
-
&_.data;
Returns the imagedata given through other sources, like databases through entities.
&_.file-size;
Returns the image's file size.
&_.src;
Returns the path to the indata file.
&_.type;
Returns the image's content-type.
&_.xsize;
Returns the width of the image.
&_.ysize;
Returns the height of the image.
Emit plugin dir
Lists files and directories in a SiteBuilder file system and provides access to their metadata.
The plugin makes it possible to get information of all files or
directories listed in a menu file. If files exists without a title
set in the meta data, they will not be shown in the listing. Use the
attribute
One file in a list of files or directories might be selected. This is usually the current file, but in the case of directories it might be any directory that is part of the path to the current file.
All <emit> attributes apply.
Attributes
- menu
- menu=filename
Reads the menu from a menu file with this name. If there are no menu file in the current directory and a
dirs ,type orglob attribute is present, a directory listing will be used. If not, the plugin will search for a menu file with this name in the parent directory and its parent directory until a suitable menu file is found or all directories has been tried.
- above
-
Only produce the part of the menu above the selected entry.
Above can be combined withselected orbelow .Note: This attribute is not suitable in combination with the
sort attribute.
- below
-
Only produce the part of the menu below the selected entry.
Below can be combined withabove orselected .Note: This attribute is not suitable in combination with the
sort attribute.
- selected
-
Only produce the selected entry.
Selected can be combined withabove orbelow .
- history
-
Get information about all directories in the path, including the current directory.
- file
- file=filename,empty field
Outputs one row of information about a specific file. If no filename is specified, information about the directory contents will be fetched. Since the directory contents is eqvivalent to the index.* file it is necessary that an index.* exists.
- dirs
-
Create a menu from all directories in the directory specified by the path attribute or the current directory. Can be combined with the
glob andtype attributes as well as themenu attribute.
- glob
- glob=glob-pattern1[,glob-pattern2,...]
Get information about files whose name match one of the glob patterns. It searches for files in the directory specified with the
path attribute or the current directory. Can be combined with thedirs andtype attributes as well as themenu attribute.
- type
- type=glob-pattern1,[glob-pattern2,...]
Get information about the files whose content type match one of the glob patterns. It searches for files in the directory specified by the
path attribute or the current directory. Can be combined with thedirs andglob attributes as well as themenu attribute.
- path
- path=path
Change which directory the
dirs ,glob andtype attributes should work on.
- sort
- sort=variable1[variable2,...],-variable1[-variable2,...]
Sorts the result according to one or several variables. A "-" put before the variable name will change the sort direction. By default the sort order is title, filename.
- notitle
-
Include files or directories that does not have any title set.
- invisible
-
Includes files which normally are hidden due to external visibility settings.
- index
-
Include the index.* file in directory listings. By default the index.* file is omitted.
- select
- select=filename,path
Make this file selected.
- undelete
-
Allows deleted files in the editarea to be listed.
Defined in content
-
&_.author-id;
Returns the author's identification number.
&_.author-name;
Returns the author's handle, i.e. login name.
&_.author;
Returns the author's name.
&_.content-editor;
Returns the full internal SiteBuilder URL to the page in the Content Editor, focusing on the file.
&_.description;
Returns the description of the file, set in the metadata.
&_.dirname;
If info about a directory is emitted then this is the name of the directory. If info about a file is emitted then this is the name of the directory that file resides in, or "" if the file is in the root directory.
&_.filename;
If info about a file is emitted then this is the name of the file. If info about a directory is emitted then this is the name of the index file in that directory, if an index file was found.
&_.filesize;
Returns the size of the file, in bytes.
&_.keywords;
Returns the keywords of the file, as set in the metadata.
&_.language;
The language of the file, as set in the metadata.
&_.languages;
All languages present in the file returned as a comma-separated string.
&_.modification-date;
Returns the date when the file was last modified on the form YYYY-MM-DD.
&_.modification-time;
Returns the time when the file was last modified on the form HH:MM:SS in the server time zone.
&_.nicefilesize;
Returns the size of the file formatted for easier reading.
&_.path;
Returns the absolute path to the file or directory.
&_.permission;
Returns the string "read" or "write" depending on whether the viewer has permission to write in the file or not.
&_.publish-time;
Returns the time when the page became, or will become, published. If the external visibility specifies a start time, then this is that time. Otherwise it is the page creation time. The time is returned as a unix timestamp integer (use the <date> to format it).
&_.revision;
Returns the file's current revision number.
&_.selectable;
For showing which XSL-template files are selectable within the "Edit metadata" wizard. Returns either "n/a" if the file is of an other content-type than "sitebuilder/xsl-template", "yes" if the file is selectable or "no" if the file isn't selectable.
&_.site-status;
Returns the file's status in the site's workarea.
&_.stationery;
Returns "yes" if the file is marked as a stationery, "no" otherwise.
&_.status-img;
Returns the full internal SiteBuilder URL to the page's current status image. The status image tells if the page has been modified etc. from the viewer's point of view. This is the same status icon as used by the Content Editor.
&_.template;
Returns the current page's selected template.
&_.title;
Returns the title of the file as set in the metadata, or, in the case of menu files, possibly overridden by the menu file entry.
&_.type-img;
Returns the internal SiteBuilder URI to where the file's content-type image is stored.
&_.type;
Returns the file's content-type.
&_.url;
Available when emitting from menu files. The value is normally the same as &_.path; except when external resources or local file references including query variables are present.
&_.user-status;
Returns the file's status in the user's workarea.
&_.uuid;
Returns the file's unique identifier (UUID) if one exists.
&_.visible-from;
Returns the date and time, in iso format, when the page starts to be visible. If external visibility is set to Never, "never" will be returned. If external visibility is set to Visible util a specified time, "now" will be returned.
&_.visible-to;
Returns the date and time, in iso format, when the page ceases to be visible. If external visibility is set to Never, "never" will be returned. If external visibility is set to Visible after a specified time, "infinity" will be returned.
&_.visible;
Returns "yes" if the file is currently externally visible, "no" otherwise.
&_.workarea-id;
Returns the unique id of the workarea. Useful when doing web applications.
&_.workarea;
Returns the name of the workarea where the viewed page is stored.
&_.workflow-hidden;
Returns "yes" if the repository version is newer than the view area version of this file, "no" otherwise. This happens when the file is controlled by workflow and internal commits have taken place since the last publish action.
Emit plugin fonts
Prints available fonts. This plugin makes it easy to list all available fonts in Roxen WebServer.
Attributes
- type
- type={ttf, all}
Which font types to list. ttf means all true type fonts, whereas all means all available fonts.
Defined in content
-
&_.copyright;
Font copyright notice. Only available for true type fonts.
&_.expose;
The preferred list name. Only available for true type fonts.
&_.family;
The font family name. Only available for true type fonts.
&_.format;
The format of the font file, e.g. ttf.
&_.full;
The full name of the font. Only available for true type fonts.
&_.name;
Returns a font identification name.
This example will print all available ttf fonts in gtext-style.
<emit source='fonts' type='ttf'> <gtext font='&_.name;'>&_.expose;</gtext><br /> </emit>&_.path;
The location of the font file.
&_.postscript;
The fonts postscript identification. Only available for true type fonts.
&_.style;
Font style type. Only available for true type fonts.
&_.trademark;
Font trademark notice. Only available for true type fonts.
&_.version;
The version of the font. Only available for true type fonts.
Emit plugin forum-attachments
List information about attachments to a message.
Attributes
- message-id
- message-id=id
This attribute is required.Show information about all attachments to this message.
Defined in content
-
&_.description;
Description of attachments.
&_.id;
Attachment ID.
&_.message-id;
ID of message it is attached to.
&_.name;
Filename of attachment.
&_.nicesize;
Humanly readable size.
&_.size;
Size in bytes.
&_.thread;
ID of the thread the message belongs to.
&_.time;
Creation time (unix timestamp).
&_.type;
Content type of attachment.
Emit plugin forum-bans
List banned IP patterns.
Defined in content
-
&_.id;
Ban ID.
&_.pattern;
The patterns that is banned.
Emit plugin forum-forums
List information aobut forums.
Attributes
- forum
- forum=id
Only show information about this specific forum.
Defined in content
-
&_.description
Forum description.
&_.id;
Forum ID.
&_.locked;
1 if forum is locked.
&_.modified;
Time stamp of last posted message in the forum.
&_.name;
Forum name.
&_.subscribed;
1 if current user is subscribing on the forum
Emit plugin forum-latest-messages
List the latest messages posted to one of the groups of forums or a specific forum.
Attributes
- id
- id=id
Show the latest messages submitted to the group of forums that is specified by the id. This id is the same as for <<forum>>
- forum
- forum=id
List the latest messages posted in this specific forum
Defined in content
-
&_.author;
The author's username.
&_.authorname;
The author's full name.
&_.edited;
Unix timestamp of last modification time.
&_.forum;
Forum ID the message belongs to.
&_.id;
Message ID.
&_.level;
The message level in the thread. First message has level 0.
&_.message;
Body of the message.
&_.parent;
Commented message ID. This is 0 (zero) if there is not a commented message ID.
&_.subject;
Subject of the message.
&_.thread;
Thread ID.
&_.time;
Unix timestamp when the message was posted.
Emit plugin forum-messages
List information about messages. Either the thread or message attribute must be given.
Attributes
- thread
- thread=id
Show information about all messages in this thread.
- message
- message=id
Show information about this specific message.
- offset
- offset=number
When using the attribute 'thread', this many messages are skipped.
- rows
- rows=number
When using the attribute 'thread', this is the maximum number of messages returned.
Defined in content
-
&_.author;
Author of the message.
&_.edited;
Unix timestamp of last modification time.
&_.id;
Message ID.
&_.level;
The message level in the thread. First message has level 0.
&_.message;
Body of the message.
&_.parent;
Commented message ID.
&_.subject;
Subject of the message.
&_.thread;
Thread ID.
&_.time;
Unix timestamp when the message was posted.
No documentation available for "plugin forum-moderators".
Emit plugin forum-my-threads
List information about threads the user has participated in.
Defined in content
-
&_.author;
Author that started the thread.
&_.forum;
Forum the thread is posted in.
&_.hidden;
1 if thread is hidden.
&_.id;
Thread ID.
&_.locked;
1 if thread is locked.
&_.messages;
Number of messages in the thread.
&_.modified;
Time stamp of last message in the thread.
&_.sbject;
Original topic of the thread.
&_.sticky;
1 if thread is sticky.
Emit plugin forum-search
Search in the forum database.
Attributes
- forum
- forum=forum ID
Only perform a search in the supplied ID of the forum.
- query
- query=string
The text to search for within the forum database.
Defined in content
-
&_.author;
The author's username.
&_.authorname;
The author's full name.
&_.forum;
Forum ID the message belongs to.
&_.id;
Message ID.
&_.level;
The message level in the thread. First message has level 0.
&_.message;
Body of the message.
&_.parent;
Commented message ID. This is 0 (zero) if there is not a commented message ID.
&_.subject;
Subject of the message.
&_.thread;
Thread ID.
&_.time;
Unix timestamp when the message was posted.
Emit plugin forum-subscribed-forums
List information aobut forums the current user is subscribed to.
Defined in content
-
&_.description
Forum description.
&_.id;
Forum ID.
&_.locked;
1 if forum is locked.
&_.modified;
Time stamp of last posted message in the forum.
&_.name;
Forum name.
Emit plugin forum-subscribed-threads
List information about threads the user has subscribed to.
Attributes
- forum
- forum=id
If a forum is supplied only subscribed threads in this forum will be shown.
Defined in content
-
&_.author;
Author that started the thread.
&_.forum;
Forum the thread is posted in.
&_.hidden;
1 if thread is hidden.
&_.id;
Thread ID.
&_.locked;
1 if thread is locked.
&_.messages;
Number of messages in the thread.
&_.modified;
Time stamp of last message in the thread.
&_.sbject;
Original topic of the thread.
&_.sticky;
1 if thread is sticky.
Emit plugin forum-threads
List information about threads. Either the forum or thread attribute must be given.
Attributes
- forum
- forum=id
Show information about all threads in this forum.
- thread
- thread=id
Show information about this specific thread.
Defined in content
-
&_.author;
Author that started the thread.
&_.forum;
Forum the thread is posted in.
&_.hidden;
1 if thread is hidden.
&_.id;
Thread ID.
&_.locked;
1 if thread is locked.
&_.messages;
Number of messages in the thread.
&_.modified;
Time stamp of last message in the thread.
&_.sbject;
Original topic of the thread.
&_.sticky;
1 if thread is sticky.
&_.subscribed;
1 if current user is subscribing on the thread
Emit plugin imgs
Similar to <imgs> but works as a emit plugin. This emit source returns dimensions and type for a given image file.
Attributes
- src
- src=string
This attribute is required.
The path to the file that should be inspected.
- quiet
- quiet=string
If provided, silently ignore run-time errors such as image not found.
Defined in content
-
&_.type;
The type of the image. Supported types are "gif", "jpeg", "png", "psd"and "tiff".
&_.xsize;
The width of the image.
&_.ysize;
The height of the image.
Emit plugin js-dynamic-popup
Creates a dynamic load popup. This plugin creates a link to a dynamic loaded popup. The content of the popup will be loaded from the specified url.
Before this tag can be used a layer with the same name as this popup must be created with the <js-dynamic-popup-div> tag.
In order to use this tag the components; CrossPlatform.js, Popup.js and DynamicLoading.js must be included in the page with the <js-include> tag.
Note that dynamic loaded layers don't work with Netscape 6 browsers. Please see the comment in the beginning of the DynamicLoading.js component file for more information.
Attributes
- src
- src=url
This attribute is required.
The page that should be loaded inte the popup.
- name
- name=string
This attribute is required.
The name of the popup.
- props
- props=javascript object name (default_props)
The name of the javascript PopupProperties object that is created by the tag. This object contains various properties for the popup. PopupProperties is defined in the Popup.js component and takes two arguments: x, and y offsets from the target event for positioning of the popup at a desired location.
There are some methods available in the object to set properties:
- setHideDelay
The time in ms it takes before the popup is hidden when the mouse leaves the popup (default is 300 ms).
- setHide2ndClick
If the popups parent is clicked a second time, the popup will be hidden if this method was called.
- setParentRightOffset
The x offset from the parent popups right border. This offset will only be used if the popup has a parent popup i.e. not at the top level. This offset overrides the x_offset.
- setParentBottomOffset
The y offset from the parent popups bottom border. This offset will only be used if the popup has a parent popup i.e. not at the top level. This offset overrides the y_offset.
- setPageX
Sets the popup to this absolute x coordinate.
- setPageY
Sets the popup to this absolute y coordinate.
- setHideDelay
An example that loads index.xml into a popup layer when the link is clicked.
<js-include file='CrossPlatform.js'/>
<js-include file='Popup.js'/>
<js-include file='DynamicLoading.js'/>
<js-dynamic-popup-div name='popup'/>
<emit source='js-dynamic-popup' name='popup' src='index.xml'>
<a href='javascript:void(0);' onClick='&_.event;'>Show</a>
</emit> |
Defined in content
-
&_.event;
The javascript event.
Emit plugin js-hide-popup
Creates a link event to hide popups. This plugin can be used in hierarchical menues on those links that are not popups, i.e. direct links on the same level as other links that leads to a popup.
<js-include file='CrossPlatform.js'/>
<js-include file='Popup.js'/>
<style><js-insert name='style'/></style>
<js-insert name='div'/>
<emit source='js-hide-popup'>
<a href='index.xml' ::='&_.args;'>Hide</a>
</emit><br />
<js-popup label='Show'>
...
</js-popup> |
Defined in content
-
&_.args;
The javascript event arguments.
No documentation available for "plugin kaltura-category".
No documentation available for "plugin kaltura-category-list".
No documentation available for "plugin kaltura-tag".
No documentation available for "plugin kaltura-video".
Emit plugin known-langs
Outputs all languages partially supported by roxen for writing numbers, weekdays et c. Outputs all languages partially supported by roxen for writing numbers, weekdays et c (for example for the number and date tags).
<emit source='known-langs' sort='englishname'>
4711 in &_.englishname;: <number lang='&_.id;' num='4711'/><br />
</emit> |
|
4711 in catala: quatre mil set-cents onze 4711 in chinese: 4711 4711 in chinese: 4711 4711 in croatian: cetiri tisuce sedamsto jedanaest 4711 in czech: čtyři tisíc sedmset jedenáct 4711 in danish: fire tusind syv hundrede og elleve 4711 in dutch: vierduizendzevenhonderdelf 4711 in english: four thousand seven hundred and eleven 4711 in finnish: neljä tuhattaseitsemänsataayksitoista 4711 in french: quatre mille sept cent onze 4711 in german: viertausendsiebenhundertelf 4711 in hungarian: négyezerhétszáztizenegy 4711 in italian: quattromilasettecentoundici 4711 in japanese: 四千七百十一 4711 in maori: whaa mano ma whitu rau ma tekau ma tahi 4711 in norwegian: firetusensjuhundreelleve 4711 in pol: cztery tysiące siedemset jedenaście 4711 in portuguese: quatro mil setecentos e onze 4711 in russian: четыре тысячи семьсот одиннадцать 4711 in serbian: cetiri hiljade sedamsto jedanaest 4711 in slovenian: ¹tiri tisoè sedemsto enanajst 4711 in spanish: cuatro mil siete cientos once 4711 in swedish: fyratusensjuhundraelva |
Defined in content
-
&_.englishname;
The name of the language in English.
&_.id;
Prints the three-character ISO 639-2 id of the language, for example "eng" for english and "deu" for german.
&_.name;
The name of the language in the language itself, for example "français" for french.
Emit plugin languages
Outputs language descriptions. It will output information associated to languages, such as the name of the language in different languages. A list of languages that should be output can be provided with the langs attribute. If no such attribute is used a generated list of present languages will be used. If such a list could not be generated the list provided in the Preferred Language Analyzer module will be used.
Attributes
- langs
Should be a comma seperated list of language codes. The languages associated with these codes will be emitted in that order.
Defined in content
-
&_.code;
The language code.
&_.confurl;
A URL which makes the language the used one by altering the Roxen cookie.
The <emit> statement must be enclosed in <nocache> to work correctly when this entity is used.
&_.en;
The language name in english.
&_.local;
The language name as written in the language itself.
&_.localized;
The language name as written in the currently selected language.
&_.preurl;
A URL which makes this language the used one by altering prestates.
Emit plugin ldap
Use this source to search LDAP directory for information. The result will be available in variables named like the returned LDAP attributes.
<emit source="ldap"
server="ldap://ldap.foo.com/dc=foo,dc=com?cn,sn,mail?sub?(sn=john)">
</emit> |
<emit source="ldap"
server="ldap://ldap.foo.com/?cn,sn,mail"
basedn="dc=foo,dc=com"
search-scope="sub"
search-filter="(sn=john)" >
</emit> |
Attributes
- server
- server=URL (Server URL)
Connection LDAP URL. If omitted the "Default server URL" in the module configuration will be used.
URLs are written on the format: ldap://hostname[:port]/base_DN[?[attribute_list][?[scope][?[filter][?extensions]]]]. For details, see RFC 2255.
- binddn
- binddn=distinguished name
Applicable only if the "server" attribute is used. This is the bind DN for authentication in the directory server. If the LDAP URL contains a "bindname" extension, that one takes precedence.
- password
- password=password
Applicable only if the "server" attribute is used. Password for authentication in the directory server. If omitted the empty string will be used.
- search-filter
- search-filter=search filter
Filter of an LDAP search operation. This value will override the corresponding part of the URL. If the URL doesn't specify a filter then this attribute is required.
- basedn
- basedn=distinguished name
Base DN of an LDAP search operation. This value will override the corresponding part of the URL.
- search-scope
- search-scope={base, one, sub}
Scope of an LDAP search operation. This value will override the corresponding part of the URL.
- attrs
- attrs=attr[,...]
Comma-separated list of attributes to retrieve. This value will override the corresponding part of the URL.
- lower-attrs
If specified, all attribute names will be converted to lowercase in the result. This is useful to access specific attributes reliably through the scope variables since LDAP attributes are case insensitive and different servers might return them with different casing.
- split
- split=string
This string is used as a separator between multiple values for the same attribute when they are concatenated together to a single string. The default string is a NUL character (�).
- array-values
If specified, multiple values aren't concatenated together using the "split" argument for attributes that aren't single-valued. Instead, the values for such attributes are returned as arrays so that they can be processed accurately with e.g. <insert source="values" ...>.
- no-values
If specified, no values will be queried, just the attribute names for which values would be returned otherwise. The value for each attribute is instead the name of the same attribute.
Defined in content
-
&_._attributes;
List of the attributes returned by the server. This is affected by the "split" and "array-values" arguments just like a multi-valued attribute value. It's however not affected by "no-values".
&_.dn;
The distinguished name of the object for this entry. Note that this field is not affected by "no-values".
&_.labeledurilabel;
If there's a labeledURI attribute in the result then this is set to the label part of it. See RFC 2079 for details about labeledURI.
&_.labeleduriuri;
If there's a labeledURI attribute in the result then this is set to the URI part of it. See RFC 2079 for details about labeledURI.
No documentation available for "plugin license-warnings".
Emit plugin path
Prints paths. This plugin traverses over all directories in the path from the root up to the current one.
Attributes
- path
- path=string
Use this path instead of the document path
- trim
- trim=string
Removes all of the remaining path after and including the specified string.
- skip
- skip=number
Skips the 'number' of slashes ('/') specified, with beginning from the root.
- skip-end
- skip-end=number
Skips the 'number' of slashes ('/') specified, with beginning from the end.
Defined in content
-
&_.name;
Returns the name of the most recently traversed directory.
&_.path;
Returns the path to the most recently traversed directory.
Emit plugin poll
Extract poll statistics.
Attributes
- id
- id=poll ID
This attribute is required.Poll ID string.
Defined in content
-
&_.max;
Highest reply count for any of the individual answers.
&_.poll_answer_1;
Number of replies for answer #1
&_.poll_answer_2;
Number of replies for answer #2
&_.poll_answer_3;
Number of replies for answer #3
&_.poll_answer_4;
Number of replies for answer #4
&_.poll_answer_5;
Number of replies for answer #5
&_.total;
Total number of replies.
Emit plugin sb-dir
Alias for the "dir" emit source that lists files and directories and accesses their metadata in a SiteBuilder file system. This can be used to explicitly distinguish it from the WebServer "dir" emit source, although that one typically maps to the SiteBuilder implementation in a Sitebuilder site. See <emit dir sitebuilder> for further information.
Similarly, WebServer provides a "ws-dir" emit source that maps to the WebServer implementation (<emit dir>), which is useful to access it from a SiteBuilder site.
Emit plugin sb-file-languages
This plugin lists a file's languages in SiteBuilder. The plugin may also list what translation status each language has.
To better manage errors, use this plugin together with <sb-error>.
All <emit> attributes apply.
Attributes
- file
- file=absolute or relative path to a file
List the language for this file. If this attribute is omitted, the current file will be used.
Defined in content
-
&_.language-code;
Returns the languagecode.
&_.translation-status;
Returns the translation status for each language. This might for instance be "In progress".
Emit plugin sb-languages
Lists all available languages in SiteBuilder.
All <emit> attributes apply.
Defined in content
-
&_.code;
The language code.
&_.name;
The english language name.
Emit plugin sb-log
This plugin extracts information about files from the version system (CVS) log in SiteBuilder. The information is listed by the entities below.
To better manage errors, use this plugin together with <sb-error>.
All <emit> attributes apply.
Attributes
- path
- path=absolute or relative path to a file or a directory
List information for this file or directory. If this attribute is omitted, the current file will be used.
Defined in content
-
&_.action;
Lists the actions that has been performed on the file. Available actions are:
Action Info create
When a file or directory has been created.
edit
When a file has been edited.
copy
When a file has been copied.
move
When a file has been moved or renamed.
delete
When a file has been deleted.
undelete
When a file has been undeleted.
&_.date;
Returns the date when an action was performed on a file.
&_.fullname;
Returns the user's full name, e.g. John Doe. The file has been edited by this user.
&_.message;
Returns the message entered by the user when he/she commited the file to the version system (CVS).
&_.revision;
Returns the file's version/revision information.
&_.user;
Returns the user's handle/loginname, e.g. John. The file has been edited by this user.
&_.userid;
Returns the user's unique identification number. The file has been edited by this user.
Emit plugin sb-referring-pages
Lists the paths of the internal pages that are referring to a specified file.
Attributes
- ea-only
- ea-only={1, 0}
If set, only referring pages from the edit area will be listed.
- va-only
- va-only={1, 0}
If set, only referring pages from the view area will be listed.
- path
- path=string
The path of the file to list referring pages for. If unset, the current file is used.
Defined in content
-
&_.path;
The path of the referring page.
Emit plugin sb-search
This plugin makes it possible to list all files matching a specified content-type or to locate a file by matching a specified string. The plugin uses the sitebuilder search "Smartsearch" to locate the files. The "Smartsearch" engine traverses each directory from the present location and upwards to the root. See the <emit dir sitebuilder> plugin for available entities.
All <emit> attributes apply.
Attributes
- content-type
- content-type=content-type
Find files matching this content-type. If supplied, the file attribute is ignored.
<form> <select name="template"> <emit source="sb-search" content-type="sitebuilder/xsl-template"> <if variable="_.selectable == yes"> <option value="&_.filename;">&_.title;</option> </if> </emit> </select> </form>
- file
- file=filename
Find files matching this filename. Will be ignored if content-type is provided.
<emit source="sb-search" file="common.xsl"> The file '&_.filename;' is located at &_.path;. </emit>
- location
- location=path
Find files from this location. If not provided the search starts at the current page's location.
Emit plugin sb-stationeries
This plugin lists all files marked as Stationery (in the metadata) in all directories starting from the current to the root. This might be useful when creating a select-box to let the user decide which stationery file a new file should be based on. See <emit dir sitebuilder> plugin for all available entities.
To better manage errors, use this plugin together with <sb-error>.
All <emit> attributes apply.
Attributes
- dir
- dir=absolute or relative path to a directory
Specifies what directory to start searching from. Defaults to the directory of the current file.
- content-type
- content-type=content-type
List only stationeries with this content-type.
Emit plugin sb-wizard
This plugin makes it possible to list information and to create links to wizards in the SiteBuilder Content Editor. If no wizard or tab argument is specified, all wizards will be listed.
If a user follows a link created with this plugin the user will enter a SiteBuilder wizard inside the Content Editor. The user will stay inside the Content Editor when the wizard is completed.
To better manage errors, use this plugin together with <sb-error>.
All <emit> attributes apply.
Attributes
- path
- path=absolute or relative path to a file or a directory (current file)
Specify the file or directory the wizards should operate on. If this attribute is omitted, the current file will be used.
- wizard
- wizard=see table below
List only the specified wizard.
File wizards
Value Description add-language
Add language to file.
add-protection-point
Add a protection point.
check-contents
Check file contents.
commit
Commit this file or directory.
copy
Copy this file or directory.
create-directory
Create a new directory in the current directory.
create-file
Create a file in this directory.
customize-template
Edit template parameters.
delete
Delete this file or directory.
delete-multiple
Delete several files at once.
discard
Discard your changes.
download
Download this file for editing.
edit-category
Edit category metadata of this file.
edit-contents
Edit the contents of this file.
edit-email-notification
Edit the email notification metadata of this file.
edit-ext-visibility
Edit external visibility.
edit-metadata
Edit the metadata for this file.
edit-permissions
Edit permissions of this file or directory.
empty-trash
Purge deleted files.
export
Export site contents to server transport directory or ZIP file.
import
Import data from server transport directory or ZIP file.
join
Join changes in two work areas.
move-rename
Move and/or rename this file or directory.
persistent-cache-prefetch-directory
Add the current directory to the persistent cache crawler queue.
persistent-cache-prefetch-file
Add the current file to the persistent cache crawler queue.
purge
Delete a file or directory permanently.
reassign-uuid
Reassign a new unique identifier to the current file.
remove-language
Remove language from file.
remove-protection-point
Remove a protection point.
search-index-directory
Add the current directory to the search crawler queue.
search-index-file
Add the current file to the search crawler queue.
select-workarea
Select work area.
undelete
Undelete a file or directory.
update
Updates the edit area version of the current file with the latest changes from the repository.
upload-contents
Upload new contents in this file.
upload-file
Create and upload a new file.
view-cache-dependencies
Show which resources that the persistent cache data for the current file depends on.
view-change-log
Show the change log of a file.
view-contents
View the file in the filesystem.
view-contributors
Show an annotated listing of a file.
view-differences
View the difference of this file in workarea and repository.
view-editing-status
Show the status of each user's edit area.
view-link-dependencies
View link relationships from the Link Manager database.
view-source
View the source code of the file.
view-translation-diffs
View the translation difference for the original and translated languages.
workflow-process-status
View current and past workflow activities related to this file.
Configuration wizards
Value Description change-password
Change your password.
change-rxml-protection-point
Changes the name of an existing protection point.
configure-workarea
Configure a work area.
create-rxml-protection-point
Create a new RXML protection point.
create-workarea
Create a new work area.
create-workflow-path
Create workflow path. Note: Only applicable to old workflow module.
default-workarea
Select default work area.
download-applauncher
Download Application Launcher.
edit-workflow-path
Edit workflow path. Note: Only applicable to old workflow module.
editor-profiles
Editor profiles.
file-types
Edit file types.
languages
Edit language settings.
link-manager
Link manager settings.
list-rxml-protection-points
Lists existing protection point.
persistent-cache-preferences
Edit persistent cache settings.
persistent-cache-status
Show persistent cache crawler status.
remove-rxml-protection-point
Remove an existing protection point.
remove-workarea
Remove a work area.
remove-workflow-path
Remove workflow path. Note: Only applicable to old workflow module.
replication-server-settings
Initiate replication server actions.
replication-server-settings
Edit replication server settings.
user-preferences
Edit your user preferences.
workflow-status
View status of workflow usage.
<emit source="sb-wizard" wizard="edit-contents"> <a href="&_.url;">Edit</a> </emit>
- tab
- tab={'files', 'prefs'}
List only the wizards in the given tab. If the attribute is set to 'files' the wizards under the 'Files' tab will be listed. If set to 'prefs' the wizards under the 'Configuration' tab will be listed.
- undelete
- undelete={yes, no} (no)
Wizard URL will link to Normal browsing mode unless this attribute is used. If set, the URL links to Undelete mode.
Defined in content
-
&_.doc;
Returns a small documentation of the wizard.
&_.name;
Returns the wizards name.
&_.status;
Returns 'enabled' or 'disabled' dependeing if the wizard is applicable to the file.
&_.tab;
Returns which tab the wizard belongs to
&_.url;
Returns the url to the wizard.
Emit plugin scopes
Provides a list of all available RXML scopes.
Defined in content
-
&_.scope;
The name of the scope.
<emit#search-database-profiles></emit#search-database-profiles>
Lists the available database profiles.
Defined in content
-
&_.name;
Returns the name of the database profile.
No documentation available for "plugin search-query-profiles".
Emit plugin site-news
List events from the CVS log.
The attributes are translated to a SQL-query on this form:
SELECT * FROM log
[WHERE
[action IN (action1, action2...)] [AND]
[path LIKE path1 [OR path LIKE path2 [OR ...]]] [AND]
[path NOT LIKE not-path1 [AND path NOT LIKE not-path2 [AND ...]]] [AND]
[(type LIKE type1 OR type LIKE type2 or ...)] [AND]
[(type NOT LIKE not-type1 AND type NOT LIKE not-type2 AND ...)] [AND]
[time > from-date] [AND]
[time < to-date]]
[GROUP BY path]
ORDER BY [time|publish] DESC |
The number of returned entries are by default limited to 10. You can change this by setting the maxrows attribute.
There is usually no need to use the nocache tag with the site-news emit source because its cache entry is updated automatically through internal notification.
Attributes
- action
- action={create, edit, delete, undelete, join}
Comma-separated list of wanted action types. Omitting this attribute means all actions. None of these actions are supported on frontends, where this attribute therefore should be omitted. Frontends may support actions in the future.
- order-by
- order-by={time, publish, random}
Order results by time of event, by date of publish, or at random. Date of publish can be configured by the Visible From value in the External Visibility wizard. Otherwise the date when the file was created is used.
- undelete
-
Allows deleted files to be listed.
- invisible
-
Allows files which are time based published to be listed.
- path
- path=string
Comma-separated list of globs or exact paths from which files resides within the SiteBuilder storage.
- not-path
- not-path=string
Comma-separated list of globs of where to not match files from within the SiteBuilder storage.
- type
- type=string
Comma-separated list of wanted content types.It can also be one or more global expressions; */xml* to match all xml types within Roxen CMS
- not-type
- not-type=string
Comma-separated string of unwanted content types. It can also be one or more global expressions; */xml* that excludes all xml files within Roxen CMS
- unique-paths
-
Indicates that each file only should appear once, with it's latest action.
- from-date
-
A date from which to search for changes. When specified,
from-publish-date andfrom-publish-time are not used. Use together withfrom-date-parse for faster execution.
- from-time
-
A date and time from which to search for changes. When specified,
from-date ,from-publish-date andfrom-publish-time are not used. Use together withfrom-date-parse for faster execution.
- from-publish-date
-
A date from which to search for changes. Used instead of
to-date to search on publication date instead of time of event. Publication date can be configured by the Visible From value in the External Visibility wizard. Use together withfrom-date-parse for faster execution.
- from-publish-time
-
A date and time from which to search for changes. Used instead of
from-time to search on publication time instead of time of event. Publication time can be configured by the Visible From value in the External Visibility wizard. When specified,from-publication-date is not used. Use together withfrom-date-parse for faster execution.
- to-date
-
A date from which to search for changes. When specified,
to-publish-date andto-publish-time are not used. Use together withto-date-parse for faster execution.
- to-time
-
A date and time from which to search for changes. When specified,
to-date ,to-publish-date andto-publish-time are not used. Use together withto-date-parse for faster execution.
- to-publish-date
-
A date from which to search for changes. Used instead of
to-date to search on publication date instead of time of event. Publication date can be configured by the Visible From value in the External Visibility wizard. Use together withto-date-parse for faster execution.
- to-publish-time
-
A date and time from which to search for changes. Used instead of
to-time to search on publication time instead of time of event. Publication time can be configured by the Visible From value in the External Visibility wizard. When specified,to-publish-date is not used. Use together withto-date-parse for faster execution.
- from-date-parse
-
Parse the
from-date ,from-time ,from-publish-date orfrom-publish-time value with this format:%Y
absolute year
%y
dwim year (70-99 is 1970-1999, 0-69 is 2000-2069)
%M
month (number, name or short name) (needs %y)
%W
week (needs %y)
%D
date (needs %y, %m)
%d
short date (20000304, 000304)
%a
day (needs %y)
%e
weekday (needs %y, %w)
%h
hour (needs %d, %D or %W)
%m
minute (needs %h)
%s
second (needs %m)
%f
fraction of a second (needs %s)
%t
short time (205314, 2053)
%z
zone
%p
'am' or 'pm'
%n
empty string (to be put at the end of formats)
Requires
from-date ,from-time ,from-publish-date orfrom-publish-time to be useful. Speeds up execution somewhat.
- to-date-parse
-
Same as
from-date-parse but is used onto-date ,to-time ,to-publish-date orto-publish-time .
Searches for xml-files in a site that any action was done on between
12 and midnight december 12 2002. Display only paths once even though
actions may have occured more and only display max 100 rows.
<noindex>
<emit source='site-news' action='*'
type='*/xml*'
from-time='2002-12-12 12:00' to-time='2002-12-13 00:00'
from-date-parse='%Y-%M-%D %h:%m' to-date-parse='%Y-%M-%D %h:%m'
unique-paths='' maxrows='100' skiprows='0'>
<div><a href='&_.path;'>&_.title;</a> &_.time; &_.action;</div>
</emit>
</noindex> |
Defined in content
-
&_.action;
The action that was performed on the page. One of create, edit, delete, undelete or join. This entity is not available on frontends.
&_.fullname;
Fullname of the user who performed the action. This entity is not available on frontends.
&_.message;
Commit message. This entity is not available on frontends.
&_.path;
Path of the file.
&_.publish;
Date of publish can be configured by the Visible From value in the External Visibility wizard. Otherwise the date when the file was created is used. Format is YYYY-MM-DD HH:MM:SS.
&_.revision;
Revision of the file. This entity is not available on frontends.
&_.time;
Time the event took place. Format is YYYY-MM-DD HH:MM:SS.
&_.title;
The page current title (from metadata), if there exists one.
&_.type;
Content type of the page.
&_.user;
Username of the user who performed the action. This entity is not available on frontends.
&_.userid;
Numeric user id of the user who performed the action. This entity is not available on frontends.
Emit plugin sources
Provides a list of all available emit sources.
Defined in content
-
&_.source;
The name of the source.
Emit plugin spellcheck
Lists from a text words that are not found in a dictionary using aspell.
Attributes
- text
- text=string
The text to be spell checked. Tags are allowed in the text.
- dict
- dict=string
Optionally select a dictionary.
- error
- error=string
Variable to set if an error occurs.
Defined in content
-
&_.offset;
Character offset to the word in the text.
&_.suggestions;
If present, a comma and space separated list of suggested word replacements.
&_.word;
The word not found in the dictionary.
Emit plugin sql
Use this source to connect to and query SQL databases for information. The result will be available in variables named as the SQL columns.
NULL values in the SQL result are mapped to a special null value. That value expands to the empty string if inserted, and tests as false with <if variable> and true with <if variable-exists>.
Compatibility note: If the compatibility level is 4.5 or lower, an SQL NULL value instead maps to an undefined value in RXML, which is similar to that the RXML variable doesn't exist at all. That makes both <if variable> and <if variable-exists> return false for it, among other things.
Attributes
- db
- db=database
Which database to connect to, among the list of databases configured under the "DBs" tab in the administrator interface. If omitted then the default database will be used.
- host
- host=url
A database URL to specify the database to connect to, if permitted by the module settings. If omitted then the default database will be used.
The database URL is on this format:
driver://[username[:password]@]host[:port][/database]
where driver is the database protocol, e.g. "odbc", "mysql", "oracle", "postgres", etc.
For compatibility this can also be a database name as given to the "db" attribute.
- module
- module=string
Access the local database for the specified Roxen module, if permitted by the module settings. This attribute is deprecated.
- query
- query=SQL statement
The actual SQL-statement.
- bindings
- bindings=name=variable,name=variable,...
Specifies binding variables to use with this query. This is comma separated list of binding variable names and RXML variables to assign to those binding variables.
Note: For some databases it is necessary to use binding variables when inserting large datas. Oracle, for instance, limits the query to 4000 bytes.
<set variable='var.foo' value='texttexttext'/> <sqlquery query='insert into mytable VALUES (4,:foo,:bar)' bindings='foo=var.foo,bar=form.bar'/>
- charset
- charset=string
Use the specified charset for the sent SQL statement and returned text values.
This will cause all SQL queries to be encoded with this charset. It will also normally cause all string results to be decoded with this charset, but there are exceptions as explained later. If the database connection supports it, the connection will be configured to use this charset too (at least MySQL 4.1 and later has such support).
In many cases, it is difficult for the SQL interface to tell text and binary data apart in results. That is a problem since a text string should be decoded according to the charset while a binary octet string must not be decoded.
If the connection supports it, using the special value unicode as charset is guaranteed to handle both text and binary result strings correctly so you don't have to worry about it. In that case you can assume the SQL query and text results covers the full Unicode range, and the connection will handle the charset issues internally. This is known to be supported with MySQL 4.1 and later. An RXML run error is thrown if it isn't supported.
Otherwise, all string values are assumed to be text and are therefore decoded using the given charset. You can turn it off for specific columns through the "binary-result" attribute.
If you use none as charset in this attribute then the charset handling described here is disabled for this query. That is useful to override a charset in the "Default charset" module setting.
The charset specification in this attribute can optionally be a list like this:
charset="recode-charset, connection-charset"
In this form, the recode-charset is used by Roxen to recode the query and results, and connection-charset is sent to the database driver to use for the connection. This is useful if the database server uses nonstandard names for its character sets. E.g. MySQL spells cp1252 as "latin1" (which is the closest you get to iso-8859-1 there), so to use that you'd say "cp1252,latin1" in this attribute. This list form is not applicable for the unicode case.
Compatibility note: In Roxen 4.5 this attribute only configured the charset for the connection; it didn't do any conversion of the query nor the results. This behavior still remains if the compatibility level is 4.5 or lower. You can also achieve the same effect by specifying "none,whatever" as charset.
- binary-result
- binary-result=column names
A comma separated list of columns in the result to not treat as text and decode according to the "charset" attribute or the "Default charset" module setting. As a special case, no result column is decoded if the value is empty.
This is only applicable if a charset is being used and it isn't "unicode" (or "broken-unicode").
Emit plugin timerange
This tag emits over a timerange between two dates (from i.e. from-date and to-date -attributes). The purpose is also that you might have a Resultset from i.e. a database (but the goal is that it should work with other resultsets why not from an ldap search?) and each row in the database result will also contain corresponding dates. But if there is no result row from the database query that match one day the variables from the Resultset will be empty.
This tag is very useful for application that needs a calendar functionality.
In Gregorian calendar, first day of the week is Sunday.
All <emit> attributes apply.
Attributes
- unit
- unit={years, months, weeks, days, hours, minutes, seconds}
This attribute is required.
years - loop over years
days - will result in a loop over days
etc.
- calendar
- calendar={ISO, Gregorian, Julian, Coptic, Islamic, Discordian} (ISO)
The type of calendar that is recieved from the to-* and from-* attributes and will also reflect the values that you get.
These are not case sensitive values.
- from-date
- from-date=YYYY-MM-DD
The date that the emit starts at (i.e. '2002-06-21' - which was midsummer eve in Sweden that year)
- from-year
- from-year=YYYY
Start the emit from this year. Used with all the unit types.
- from-time
- from-time=HH:MM:SS
Two digits for hours, minutes and seconds - separated by colon. Useful when the value of unit is hours, minutes or seconds. But it might also influence when used with the
query attribute.
- to-date
- to-date=YYYY-MM-DD
The date (i.e. '2002-06-21' - which was midsummer eve in Sweden that year)
- to-year
- to-year=YYYY
Emit to this year. Used with all the unit types.
- to-time
- to-time=HH:MM:SS
Two digits for hours, minutes and seconds - separated by colon. Useful when the value of unit is hours, minutes or seconds. But it might also have impact when used with the query attribute.
- from-week-day
- from-week-day={monday, tuesday, wednesday, thursday, friday, saturday, sunday}
Alter the startdate to nearest weekday of the choice which means that if you declare in
from-date 2002-07-25 which is a tuesday the startdate will become 2002-07-24 when from-week-day='monday'. So far this is supported by ISO, Gregorian and Julian calendar.
- to-week-day
- to-week-day={monday, tuesday, wednesday, thursday, friday, saturday, sunday}
Alter the
to-date to neareast weekday this day or after this day depending on where the weekday is. So far this is supported by ISO, Gregorian and Julian calendar.
- inclusive
- inclusive=empty
Affects the to-* attributes so that the
to-date will be included in the result. See examples below.
- query
-
A sql select query. Must be accompanied by a
compare-date attribute otherwise it will throw an error. The attribute can for now only compare date in the ISO date format secompare-date for the ISO format.
- compare-date
- compare-date=sql-column-name
A column - or alias name for a column in the sql select query. The value of the column must be of the ISO format corresponding to the
unit attribute asked for.unit format years
YYYY
months
YYYY-MM
weeks
has none (for now)
days
YYYY-MM-DD
hours
YYYY-MM-DD HH
minutes
YYYY-MM-DD HH:mm
seconds
YYYY-MM-DD HH:mm:ss
This attribute is mandatory if the
query attribute exists. This attribute does nothing if the query attribute doesn't exists.
- host
- host=db-host-name
A databas host name, found under DBs in Administration Interface. Used together with
query attribute. See <emit source="sql"> for further information.The "SQL tags" module must be loaded for this to work, and the "Allowed databases" setting in it is used to restrict database access.
- language
- language=langcode
The language code to use:
cat (for catala)
hrv (for croatian)
nld (for dutch)
eng (for english)
fin (for finnish)
fra (for french)
deu (for german)
hun (for hungarian)
ita (for italian)
nor (for norwegian)
pol (for polish)
por (for portuguese)
srp (for serbian)
slv (for slovenian)
spa (for spanish)
swe (for swedish)
<emit source='timerange' unit='hours'
from-time='08:00:00' to-time='12:00:00' inclusive='1'>
<div>&_.hour;:&_.minute;:&_.second;</div>
</emit> |
|
8:0:0
9:0:0
10:0:0
11:0:0
12:0:0
|
<emit source='timerange' unit='days'
from-date='2002-11-23' to-date='2002-12-25'
from-week-day='monday' calendar='ISO' to-week-day='sunday' inclusive='1'>
<if variable='_.week.day is 7'>
<font color='red'>
<if sizeof='_.day is 1'>0</if>&_.day;
</font>
<br />
</if>
<else>
<if sizeof='_.day is 1'>0</if>&_.day;
</else>
</emit> |
|
18
19
20
21
22
23
24
25 26 27 28 29 30 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 |
Database system this example uses: MySQL
Database name: mydb
Table name: calendar_src:
| name | type |
|---|---|
id |
INT PRIMARY KEY |
start_date |
DATETIME |
end_date |
DATETIME |
day_event |
TEXT |
<table border='1'>
<tr>
<emit source='timerange'
unit='days' calendar='ISO'
from-date='2003-03-01'
to-date='2003-03-31'
from-week-day='monday'
to-week-day='sunday'
inclusive=''
query='SELECT day_event,
DATE_FORMAT(start_date,"%Y-%m-%d") as comp_date
FROM calendar_src
WHERE start_date > "2003-03-01 00:00:00"
AND start_date < "2003-04-01 00:00:00:"
ORDER BY start_date'
compare-date='comp_date'
host='mydb'>
<if variable='_.ymd_short is &var.ymd_short_old;' not=''>
<![CDATA[</td>]]>
</if>
<if variable='_.week.day is 1'
match='&_.ymd_short; != &var.ymd_short_old;'>
<if variable='_.counter > 1'>
<![CDATA[
</tr>
<tr>]]>
</if>
<td width='30' valign='top'>
<div>&_.week;</div>
</td>
<![CDATA[<td width='100' valign='top'>]]>
<div align='right'>&_.month.day;</div>
<div>&_.day_event;</div>
</if>
<else>
<set variable='var.cal-day-width'
value='{$working-day-column-width}'/>
<if variable='_.ymd_short is &var.ymd_short_old;' not=''>
<![CDATA[<td width='100' valign='top'>]]>
<if variable='_.week.day is 7'>
<div align='right' style='color: red'>
&_.month.day;
</div>
</if>
<else>
<div align='right'>&_.month.day;</div>
</else>
</if>
<div>&_.day_event;</div>
</else>
<set variable='var.ymd_short_old' from='_.ymd_short'/>
</emit>
</tr>
</table> |
The code above does not work in a XML- or XSLT-file unless modified to conform to XML. To accomplish that <xsl:text disable-output-escaping='yes'> <![CDATA[<td>]]> </xsl:text> will solve that. Or it could be placed in a RXML-variable: <set variable='var.start_td' value='<td>'/> and used: &var.start_td:none; see documentation: Encoding, under Variables, Scopes & Entities
Defined in content
-
&_.day;
Same as &_.month.day;
&_.days;
Same as &_.month.days;
&_.default.calendar;
Returns the this modules default calendar. I.e. "ISO", "Gregorian" etc.
&_.default.language;
Returns the this modules default language.
&_.default.something;
Returns the this modules settings.
&_.default.timezone.detail;
Returns the this modules default timezone specific part. I.e. Stockholm if the timezone is Europe/Stockholm
&_.default.timezone.region;
Returns the this modules default timezone region. I.e. Europe if the timezone is Europe/Stockholm
&_.default.timezone;
Returns the this modules default timezone.
&_.hour;
Returns the hour. (Time zone dependent data)
&_.hours;
Returns the hour zero padded. (Time zone dependent data)
&_.julian-day;
Returns the Julian day number since the Julian calendar started.
&_.minute;
Returns minutes, integer value, i.e. 5 (Time zone dependent data)
&_.minutes;
Returns minutes, zero padded, i.e. 05 (Time zone dependent data)
&_.month.day;
Returns the day number in the month
&_.month.name;
Month name. Language dependent.
&_.month.number-of-days;
Integervalue of how many days the month contains. &_.month.number_of_days; will also work due to backward compatibility.
&_.month.number_of_days;
Returns the number of days there is in a month.
&_.month.short-name;
Month short name. Language dependent.
&_.month;
Returns the month number i.e. 3 for march
&_.next.day;
Returns the next date the next day.
&_.next.hour;
Returns the next date the next hour.
&_.next.minute;
Returns the next date the next minute.
&_.next.month;
Returns the next date the next month.
&_.next.second;
Returns the next date the next second.
&_.next.something;
Returns date compared to the current date. This will display a new date that is next to the current date.
&_.next.week;
Returns the next date the next week.
&_.next.year;
Returns the next date the next year.
&_.prev.day;
Returns the previous date the previous day.
&_.prev.hour;
Returns the previous date the previous hour.
&_.prev.minute;
Returns the previous date the previous minute.
&_.prev.month;
Returns the previous date the previous month.
&_.prev.second;
Returns the previous date the previous second.
&_.prev.something;
Returns date compared to the current date. This will display a new date that is previous to the current date.
&_.prev.week;
Returns the previous date the previous week.
&_.prev.year;
Returns the previous date the previous year.
&_.second;
Returns seconds. (Time zone dependent data)
&_.seconds;
Returns seconds, zero padded. (Time zone dependent data)
&_.this.day;
Returns the this date this day.
&_.this.hour;
Returns the this date this hour.
&_.this.minute;
Returns the this date this minute.
&_.this.month;
Returns the this date this month.
&_.this.second;
Returns the this date this second.
&_.this.something;
&_.this.week;
Returns the this date the this week.
&_.this.year;
Returns the this date this year.
&_.time;
Returns time formated hh:mm:ss (ISO)
&_.timestamp;
Returns a date and time timestamp formated YYYY-MM-DD hh:mm:ss
&_.timezone.iso-name;
Returns the ISO name of the timezone
&_.timezone.name;
Returns the name of the time zone.
&_.timezone.seconds-to-utc;
The offset to UTC in seconds. (Time zone dependent data)
&_.timezone;
Returns the timezone iso name.(Time zone dependent data
&_.unix-time;
Returns seconds since 1:st of january 1970 01:00:00
Time zone dependent data
&_.week.day.name;
Returns the name of the day. I.e. monday. Language dependent
&_.week.day.short-name;
Returns the name of the day. I.e. mo for monday. Language dependent
&_.week.day;
Returns the week day number. 1 for monday if it is ISO 1 for sunday if it is Gregorian. ISO is default if Gregorian is not specified for the
calendar . Language dependent&_.week.name;
the name of the week. I.e. w5 for week number 5 that year.
&_.week;
Returns the week number. Language dependent
&_.weeks;
Returns the week number. Zero padded. Language dependent
&_.year.day;
Returns the day day of the year for date, in the range 1 to 366
&_.year.is-leap-year;
Returns TRUE or FALSE
&_.year.name;
Returns the year number i.e. 2003
&_.year;
Returns the year i.e. 2003
&_.ymd;
Returns a date formated like YYYY-MM-DD (ISO date)
&_.ymd_short;
Returns a date formated YYYYMMDD (ISO)
No documentation available for "plugin timezones".
Emit plugin values
Iterates over the component values of a string or a compound value. If it's a string, it's split into pieces using a separator string, and the plugin then iterates over the pieces. If it's a compound value like an array then the plugin iterates over its elements.
Attributes
- values
- values=mixed
The value to iterate over. This attribute is required unless the "variable" or "from-scope" attribute is used.
- variable
- variable=name
Name of a variable from which the value are taken.
- split
- split=string (NULL)
The string to split a string value with. Supplying an empty string results in the string being split between every single character. This has no effect if the value isn't a string.
- nosplit
If specified then the value isn't split, even when it is a string. Instead the plugin only evaluates its contents once using the whole string.
This is useful if a value might either be a single string or multiple strings as an array, and you want to iterate over each full string.
- advanced
- advanced={lines, words, csv, chars}
If the value is a string it can be split into separate lines, words, CSV (comma separated values) fields or characters by using this attribute.
- case
- case={upper, lower}
Change the case of each returned value.
- trimwhites
Trim away all leading and trailing white space charachters from each returned value.
- randomize
- randomize={yes, no}
Outputs the values in random order if it has the value 'yes'.
- distinct
If specified, values are only output once even if they occur several times.
- from-scope
- from-scope=name
Iterate over a scope like a mapping. &_.index; gets the name of each variable in it and &_.value; gets the corresponding value.
Defined in content
-
&_.index;
The index of one element. This is set if the value being iterated over is a mapping/scope or a multiset.
&_.value;
The value of one element or substring if a string is being split.

