Инструменты пользователя

Инструменты сайта


limb3:en:packages:wact:tags

WACT tag dictionary (including Limb3 specific tags)

Most of the pages have usage examples. In some cases the whole group of tag has the only example, in such cases the page with usage example is marked with «See example here!»«

You can also browse examples in SVN at : https://svn.limb-project.com/3.x/examples/wact/examples/.

Or you can also download examples from http://projects.limb-project.com/ (see. WACT section)

WACT Core Tags

TagDescription
Location: limb/wact/src/tags/core/
<core:block>Allows to join a group of tags into single block and to show or to hide this block
<core:comment>Allows to insert a comment into template that will not be rendered.
<core:datasource>Provides a scope for template variables. In other words inserts a new data context (datasource) into template
<core:optional>Outputs a portion of the template if named variable exists at runtime.
<core:default>Outputs a portion of the template if a given variable is not defined at runtime (partner of <core:optional> tag
<core:if>Outputs a portion of the template if a given variable expression is true.
<core:include>Outputs a portion of the template if a given variable.
<core:literal>Prevent contents of tag from being parsed.
core:placeholder>Present a named location where content can be inserted. Partner of <core:wrap> tag.
<core:repeat>Allows to output a portion of the template several times.
<core:runtimecontent>Provides a placeholder in the template at runtime where any text can be rendered.
<core:wrap>Wraps a portion of the current template into some placeholder of the base (parent) template and thus compiles two (or more) templates into a single one.
<core:set>Sets the value of a variable (or several variables) in the current scope

WACT List Tags (WACT tags to output lists and tables)

TagDescription
Location: limb/wact/src/tags/list/
<list:list>Defines a list boundaries. Holds iterator. See example here!
<list:item>Used to contain the content for rendering list items (rows). Repeated for every item in iterator. See example here!
{$:ListRowNumber}Outputs number of the current row.
{$:ListRowOdd}Has true value if current row is odd. Used inside <list:item> tag contents
{$:ListRowEven}Has true value if current row is even. Used inside <list:item> tag contents
{$:Parity}Emits odd or even depending on row. Used inside <list:item> tag contents
<list:default>Define alternative output to be shown when enclosing list is empty
<list:separator>Define output between list items
<list:fill>Used to generate valid markup in multicolumn lists

WACT Form tags

TagDescription
Location: limb/wact/src/tags/form/
<form>Enhanced html <form> tag.
<form:errors>Used in rendering form validation errors.
ControlTag (has no tag) A base class for all form elements tags.
<input>Enhanced html <input> tag.
<button>Enhanced html <button> tag.
<text_area>Enhanced html <textarea> tag.
<label> Enhanced html <label> tag.
<js_checkbox> Inserts a DHML checkbox with hidden input field, that always returns 0 or 1 (unlike regular <input type='checkbox'> tag).
<select> Enhanced html <select> tag.
<option> Enhanced html <option> tag.
<select:options_source> Used to generate options lists for <select> tags from iterators or arrays.
<form_multiple> Enhanced version of WACT <form> tag. Automatically prefixes all form fields names with form name. Allows to have several active form on the same page.
<form:referer>Renders a hidden input with $_SERVER[«HTTP_REFERER»] value or with referer parameter of the request.
<form:preserve_state> Allows to specify what request parameters should be passed through the form.

Wact Pager tags (WACT tag to perform lists pagination)

TagDescription
Locationlimb/wact/src/tags/pager/
<pager:navigator> The root element of a page. See example here!
<paginate> Allows to link pager with list and thus paginate iterator right in the template.
<pager:prev> The element that steps back one page.
<pager:first> The «back to start» element of the pager.
<pager:next> The element that steps forward one page.
<pager:last> The «go to end» element of the pager.
<pager:list> Marks the «iterable» section of the pager.
<pager:number> Allows to render a link to some page.
<pager:current> Allows to render a link or just a number of the current page
<pager:separator> The separator between <pager:number> and <pager:current> tags.
<pager:section> Allows to render a link to a block of pages. In a pager e.g. 1 2 3 [4-6] [7-9] (the [4-6] is a section)
<pager:elipses> Allows to render a separator between groups of links to pages in the begining, in the middle and in the end of the pager. In a pager e.g. …6 7 8… (the … are the elipses)
Tag properties. Can be used inside <pager:navigator> tag
{$:TotalPages}Total number of pages.
{$:TotalItems}Total items in paginated list.
{$:HasMoreThanOnePage}Has true value if pager has more than one page.
{$:BeginItemNumber}Has number of record that the current page starts with.
{$:EndItemNumber}Has number of record that the current page ends with.

WACT Request tags

TagDescription
Location: limb/wact/src/tags/request/
<site_branch_selector>Defines a group of tags that can render different portions of the template depending on the request URL.
<site_branch> Renders a portion of the template if page URL contains a certain substring.

Wact Fetch tags (used to fetch data right from WACT template also known as PULL-VIEW)

TagDescription
Location: limb/wact/src/tags/fetch/
<fetch> Performs data fetch operations with classes implementing WactFetcher interface.
<fetch:params> Allows to pass parameters to fetchers.
<fetch:decorate> Allows to decorate fetched iterator with some decorator right in the template.

Limb Fetch tags

TagDescription
Location: limb/web_app/src/template/tags/fetch/
<active_record:fetch> Advanced version of <fetch> tag that used Limb3 ActiveRecords as a source of data.
<find:params> A kind of <fetch:param> tag, allows to pass any params to custom find-method. A partner of <active_record:fetch> tag.

Wact Iterator tags (used to pass iterators between tags and to decorate iterators right in WACT template)

TagDescription
Location: limb/wact/src/tags/iterator/
<iterator:transfer> Moves iterator from one scope to other. Useful if transfered iterator should be paginated, sortered or decorated
<iterator:decorate> Allows to decorate transtered iterator with some decorator right in the template. A partner of <interator:transfer> tag.

Wact Perform tags (a group of tags to execute method of template helper-objects)

TagDescription
Location: limb/web_app/src/template/tags/perform/
<perform> Defines a callback of some method of so called template command that is a class implementing WactTemplateCommand interface. With <perform> tag you can insert a callback into template that will be affect template somehow. For example you can change a number of rendered items per page in pager, load some data, insert variables into template etc.
<perform:params> Allows to pass parameters to executed template command method. Used inside <perfor> tag.

Limb Request tags

TagDescription
Location: limb/web_app/src/template/tags/request/
<route_url> Renders <a> tag, with «href» attribute value created by lmbRoutes class.
<route_url_set> Inserts into the current scope a variable with value created by lmbRoutes class.

WACT Dev tags (WACT tags used during template development)

TagDescription
Location: limb/wact/src/tags/dev/
<dev:dataspace> View the contents of a runtime datasource.
<dev:source> View the PHP source code generated into the compiled template.

Обсуждение

Ваш комментарий. Вики-синтаксис разрешён:
  _   __  _   __   ___    ___    __  ___
 | | / / | | / /  / _ |  / _ )  /  |/  /
 | |/ /  | |/ /  / __ | / _  | / /|_/ / 
 |___/   |___/  /_/ |_|/____/ /_/  /_/
 
limb3/en/packages/wact/tags.txt · Последние изменения: 2010/11/10 10:02 (внешнее изменение)