|
|
|
list
|
find items and render them with the given HTML snippet
<nv object="list" source="item" items="10" paginator="true" order="newest">
<span class="title"> <nvlist source="item" value="title"> </span>
(more HTML and nvlist tags)
</nv>
<nv object="list" source="rss" items="5" url="http://www.navigatecms.com/rss">
<a href="{{nvlist value='url'}}" target="_blank"> {{nvlist value='title'}} </a>
</nv>
<nv object="list" source="mywebsite" items="5" custom_source="true">
{{nvlist source='item' value='date'}}
</nv>
<nv object="list" source="block" items="5" order="random">
{{nvlist source='block' value='property' property='selected_video'}}
</nv>
|
- source
- [ item | structure | comment | website_comments | block | block_group | gallery | rss | twitter ]
- list elements of the type defined
- items
- number of elements to display (0 => all)
ID of the property which has the value of how many items to show
- paginator
- true
classic
- browse through all elements using a paginator
- false (default option)
- don't display a paginator
- prev/next
- simple paginator: previous/next buttons only
- first/prev/next/last
- simple paginator enhanced: previous/next buttons and first/last buttons
- prev/central/next
- previous, next buttons and central pages (4 5 *6* 7 8)
- first/prev/central/next/last
- buttons: first, previous, central pages, next, last (First Previous 4 5 *6* 7 8 Next Last)
- all_pages
- display a link for every page available
- paginator_prev
paginator_next paginator_first paginator_last paginator_etc
- text or string code (of the dictionary) used in the paginator special links
- paginator_tag_id
- id of the html tag (without #) where to put the paginator code (only 1 paginator allowed per page)
- type
- code of the blocks type to retrieve
- categories
- [ (empty) | all | IDs | property_id | nvlist_parent ]
- when empty, it takes the current category as the source for items
- set "all" to get items from all website categories or
- comma separated IDs of the structure elements to search from
- property name which has a set of categories as the value
- if we are creating a list inside another list, use the current category of the parent list
- children
- true
- include the categories and all its child structure elements
- false
- just search in the given categories
- only
- don't search in the given categories, only its children
- (number)
- search until a certain number of sublevels
- order
- [ priority | newest | oldest | future | alphabetical | reverse_alphabetical | random | rating | votes | views | comments | hierarchy_newest ]
- sort results using a particular criteria
- embedded
- [ false | true ]
- search for non-embedded ("own path") items only (default) or embedded items (without an assigned path)
- exclude
- comma separated IDs of result elements to forget
(use "current" to remove the current page element)
- templates
- retrieve only items using certain templates (comma separated values)
- filter
- apply special search filters
- menu
- when source="structure", keep only visible menu elements
- (json objects array)
- when source="item", add some conditions in the search query; please use single quotes only, example:
filter="[{'property.entry_type': 'image'}, {'id': { 'gte': 10 }}, {'date_to_display': {'lte': '$filter_date'}}, {'property.entry_featured_object_inside': {'in': [0, 1]}}]"
available comparators: eq, neq, lt, lte, gt, gte, in, nin (not in), has, hasnot use property.property_name to filter by a property value elements' fields: id, date_to_display, author, score, votes prepend a dollar character if you want to use a value sent in the request, for example, if the URL has ?q=45, use '$q' to use that value in the filter query
- delayed
- [ true | false ]
- delay nvlist tags processing until all other nv tags are treated
(by default nvlist tags are processed before anything else)
- custom_source
- [ true | false ]
- use a widget-defined-function as a source
(remember to set nv list "source" to your nvweb_SOURCE_list)
- url
- absolute url of the feed (only for source="rss") or
- name of the property which has the URL source
- username
- read the tweets of this user (only for source="twitter")
- cache
- seconds to keep the last twitter/rss query (only for "twitter" and "rss" modes)
(default: 3600 seconds)
|
search
|
find items containing a certain text and render them with the given HTML snippet
<nv object="search" request="search-field" items="10" paginator="true" order="rating">
<a href="{{nvlist source='item' value='url'}}"> <nvlist source="item" value="title"> </a>
<br>
</nv>
|
- request
- name of the $_REQUEST['field'] which contain the text to search
- items
- number of elements to display (0 => all)
- paginator
- true
classic
- browse through all elements using a paginator
- false (default option)
- don't display a paginator
- prev/next
- simple paginator: previous/next buttons only
- first/prev/next/last
- simple paginator enhanced: previous/next buttons and first/last buttons
- prev/central/next
- previous, next buttons and central pages (4 5 *6* 7 8)
- first/prev/central/next/last
- buttons: first, previous, central pages, next, last (First Previous 4 5 *6* 7 8 Next Last)
- all_pages
- display a link for every page available
- paginator_prev
paginator_next paginator_first paginator_last paginator_etc
- text or string code (of the dictionary) used in the paginator special links
- paginator_tag_id
- id of the html tag (without #) where to put the paginator code (only 1 paginator allowed per page)
- categories
- [ (empty) | all | IDs | property_id | nvlist_parent ]
- when empty, it takes the current category as the source for items
- set "all" to get items from all website categories or
- comma separated IDs of the structure elements to search from
- property name which has a set of categories as the value
- if we are creating a list inside another list, use the current category of the parent list
- request_categories
- parameter name sent by a form which gives the list of categories to search in; the given categories must be a subset of the selected by the parameters categories + children, if not it will be discarded
- children
- true
- include the categories and all its child structure elements
- false
- just search in the given categories
- only
- don't search in the given categories, only its children
- (number)
- search until a certain number of sublevels
- order
- [ priority | newest | oldest | future | alphabetical | reverse_alphabetical | random | rating | votes ]
- sort results by a particular property
- no_results_found
- text or string code (of the dictionary) used when the search finds nothing (set no_results_found="" to avoid showing any message)
- delayed
- [ true | false ]
- delay nvsearch tags processing until all other nv tags are treated
(by default nvsearch tags are processed before anything else)
|
<nvlist source="..." />
source='...' />
|
item
|
display an item value or property
<nvlist source="item" value="title" />
<nvlist source="item" value="section" section="main" />
<nvlist source="item" value="score" />
<nvlist source="item" value="property" property="Main image" width="300" height="200" border="false" />
|
- id
- numeric ID of the item in Navigate CMS
- slug
- textual identifier based on the element's path (useful for HTML IDs)
- title
- item title
- length
- show a maximum of x chars (followed by …)
- date
- section / content
- item content section
- section
- length
- show a maximum of x chars (followed by …)
- allowed_tags (when using the "length" parameter)
- comma separated tag names which won't be removed, for example: "a,br"
- comments
- number of published comments associated to the item
- author
- name of the Navigate CMS user who created that content
- gallery
- generate the item's image gallery
define the properties using the same attributes as in gallery (nvweb)
- image / photo
- return the url of the first image in the item's gallery
- path / url
- item's relative url (same as entered in Navigate CMS for that language)
- score
- score given to an item
use same attributes as in votes (nvweb) (mode="score" implicit)
- views
- number of times this content has been seen
- votes
- number of webusers who have voted this item
- tags
- list of tags assigned to this element for the current language
accepts the same parameters as in nvweb content mode="tags"
- property
|
product
|
display an item value or property
<nvlist source="product" value="title" />
<nvlist source="product" value="section" section="main" />
<nvlist source="product" value="score" />
<nvlist source="product" value="property" property="Main image" width="300" height="200" border="false" />
<nvlist source="product" value="price" />
<nvlist source="product" value="stock" out_of_stock="Not available!" />
<nvlist source="product" value="size" return="height" />
|
- id
- numeric ID of the product in Navigate CMS
- slug
- textual identifier based on the product's path (useful for HTML IDs)
- title
- product name
- length
- show a maximum of x chars (followed by …)
- date
- section / content
- product content section
- section
- length
- show a maximum of x chars (followed by …)
- allowed_tags (when using the "length" parameter)
- comma separated tag names which won't be removed, for example: "a,br"
- comments
- number of published comments associated to the product
- author
- name of the Navigate CMS user who created that product
- gallery
- generate the product's image gallery
define the properties using the same attributes as in gallery (nvweb)
- image / photo
- return the url of the first image in the product's gallery
- path / url
- product's relative url (same as entered in Navigate CMS for that language)
- score
- score given to a product
use same attributes as in votes (nvweb) (mode="score" implicit)
- views
- number of times this product has been seen
- votes
- number of webusers who have voted this product
- tags
- list of tags assigned to this product for the current language
accepts the same parameters as in nvweb content mode="tags"
- property
- size
- return the size of the product, defaults to "width x height x depth unit"
- separator
- string to be used as a separator for each size (default is " x ")
- return
- [ width | height | depth | unit ]
- weight
- return the weight of the product, defaults to "weight_value weight_unit"
- stock
- return the available stock for the product, or a theme string to mask the number
- price
- return the current price for the product
- return
- [ (empty) | value | internal | currency ]
example for a price of 12,34 euros (empty): 12,34 € value: 12,34 internal: 12.34 currency: €
- old_price
- return the old price for the product (ignoring any current offer);
if old_price = current_price, then this call returns nothing
- return
- [ (empty) | value | internal | currency ]
- tax
- return the tax applied for the product
- return
- [ (empty) | value | amount ]
example for a price of $10 + 10% tax (empty): 10 % value: 10 % amount: $ 1
- tax_free
- theme dictionary label to use when product is free of taxes
- tax_included
- theme dictionary label to use when product has taxes already included
|
comment
|
return a property of a comment
<nvlist source="comment" value="avatar" size="32" default="/img/default_avatar.png" />
|
- id
- username
- author of the comment (name or webuser name)
- avatar
- webuser's avatar
- size
- size in pixels (square, "32" => 32x32)
- default
- if the comment owner is not a webuser or is a webuser without avatar, show a default avatar
options:
- numeric ID of the image file in Navigate CMS
- absolute url of an image (http://...)
- relative path to an image inside the website theme folder
- none (do not display an image)
- border
- [ true | false ]
- resize the avatar leaving a transparent border (default) or scale & crop the image
- class
- class name to be appended to each avatar img tag
- linked
- [ false | true ] include the webuser's website as a link on avatar and username
- gravatar_default
- [ blank | none | identicon | mm | monsterid | wavatar | retro | 404 ]
- how to display the default avatar when the webuser doesn't have any assigned; examples
- message
- text of the comment
- length
- maximum number of characters to display (followed by …)
- date
- website
- website specified by the user
- item_title
- title of the associated element content
- item_url
- url of the associated element
- reply_to
- id of the comment which this one is replying to
- depth
- depth level of the comment in the hierarchy (starting from 0)
- webuser_comments
- number of comments posted by the author of this message (counted only for registered webusers!)
- property
|
structure category
|
return a property of a category
<nvlist source="structure" value="title" />
{{nvlist source='structure' value='id'}}
<nvlist source="structure" value="property" property="background_color" />
|
- id
- numeric ID of the category in Navigate CMS
- title
- slug
- simplified name based on the title
- url / path
- relative path of the structure element
- count
- number of children this category has
- property
|
gallery
|
return a property of an item of a gallery
<nvlist source="gallery" value="thumbnail" width="120" border="true" />
{{nvlist source='gallery' value='url'}}
{{nvlist source='gallery' width='200' height='150' border='false'}}
|
- thumbnail
- generate an img tag for a thumbnail; additional parameters accepted: width, height, border
- url / path
- absolute url to the full image
- (empty) / no value
- generate an "<a>" tag with the full image in the href and an img tag for the thumbnail
additional parameters accepted: width, height, border
|
block
|
generate HTML metatags based on blocks content and its properties
<nvlist source="block" value="title" />
<nvlist source="block" value="property" property="selected_video" />
|
- id
- numeric identifier of the block
- title
- block
- block content and action (link) (the format is defined by the user when editing the block in Navigate CMS)
you can set extra attributes that will be processed when rendering the content: width, height, border, wrapper, wrapper_class... if the block must display an image, you can set return="url" to retrieve the image url, not the <img> tag
- content
- pure block content (trigger) without the action (the format is defined by the user when editing the block in Navigate CMS)
you can set extra attributes that will be processed when rendering the content: width, height, border, wrapper, wrapper_class... if the block must display an image, you can set return="url" to retrieve the image url, not the <img> tag
- url / path
- link entered by the user for this block
- target
- action target modifier (returns "_self" or "_blank")
- property
- poll_answers
- render the poll results (sólo for "poll" blocks)
- separator
- adds the string between each link shown (only for blocks type "links")
- wrapper
- [ ul ]
- puts the links in a certain type of structure (only for blocks type "links")
ej. <ul><li>link 1</li><li>link 2</li><ul>
- wrapper_class
- assigns a class to the tag which wraps the links (only for blocks type "links")
ej. <ul class="custom_class">
|
block_group
|
load all blocks from a group and display them using conditionals
<nv object="list" source="block_group" type="sidebar">
<nvlist_conditional by="block" type="sidebar_blog_archive">
[...]
</nvlist_conditional>
<nvlist_conditional by="block" type="sidebar_blog_archive">
[...]
</nvlist_conditional>
</nv>
|
|
block_link
|
returns data of each link in a block with the trigger type "links"; it is only used INSIDE another list that loads the block
<nv object="list" source="block" type="social_links">
<nv object="list" source="block_link">
<div class="social_link">
<a href="{{nvlist source='block_link' value='url'}}"
target="{{nvlist source='block_link' value='target'}}"
title="{{nvlist source='block_link' value='title'}}">
<i class="fa {{nvlist source='block_link' value='icon'}}"></i>
</a>
</div>
</nv>
</nv>
|
- id
- numerical position of the link (starting with zero)
- title
- title assigned to the link
- url / path
- target
- open link in the same window or in a new one (returns "_self" or "_blank")
- icon
- classname for the icon assigned to the link
|
block_type
|
display some value related to the currently processing block_type (used mainly when processing a nvlist of type "block_group")
<nvlist source="block_type" value="title" />
|
- title
- return the title assigned to the block type zone
|
position
|
display the value related to the position of the current result row
<nvlist source="position" value="numeric" />
<nvlist source="position" value="alphabetic" absolute="true" />
|
- value
- numeric display the position as a natural number
- alphabetic display the position with letters (a, b, c... then aa, ab, ac... aaa, aab, aac...)
- absolute
- [ false | true ] if "true", the position is calculated in relation to the paginator; with empty or "false" the position is only calculated based on the current page
|
query
|
return a column value of the resultset (only for "custom_source")
<nvlist source="query" value="column_name" />
|
|
<nvlist_conditional by="..."> [html] </nvlist_conditional>
|
position
|
add the given HTML code only when a certain list position is parsed
<nvlist_conditional by="position" each="4"><div class="separator"></div></nvlist_conditional>
<nvlist_conditional by="position" position="last"><div class="pre-footer"><hr /></div></nvlist_conditional>
<nvlist_conditional by="position" range="1-3"><div class="featured"></div></nvlist_conditional>
|
- position
- add the code when showing the item on the position specified
- first
- first list item on this page
- last
- last list item on this page
- not_first
- is not the first list item on this page
- not_last
- is not last list item on this page
- (number)
- concrete list item position
ex.: show the html when displaying the third item (position="3")
- each
- add the code on each multiple of the given integer (excluding the first element)
example: put a separator each 4 elements
- range
- add the code only for a certain range of elements (defined by its position)
- ex.: range="1-3" (first three elements only)
|
access
|
add the given HTML code depending on the visitor access level
<nvlist_conditional by="access" access="signed_in"><div class="webuser_usename">Rate this content!</div></nvlist_conditional>
|
- everyone
- show the content to everyone
- signed_in
- show the content only when the page request comes from a signed in user
- not_signed_in
- show the content only when the page request comes from a NOT signed in user
- webuser_groups
- show the content only when the page request comes from a signed in user who is part of a webuser group
- navigate_user
- show the content only when the page request comes from a signed in navigate cms user
|
template templates
|
add the given HTML code only when the current item uses a certain template
<nvlist_conditional by="template" template="blog_entry"><div class="entry-author">{{nvlist source='item' value='author'}}</div></nvlist_conditional>
<nvlist_conditional by="templates" templates="blog_entry,blog_entry_fullwidth"><div class="entry-author">{{nvlist source='item' value='author'}}</div></nvlist_conditional>
|
- template / templates (both are valid)
- IDs (codenames) of templates that apply on the current condition, you can give some separated by commas (no spaces!)
|
block
|
when parsing a block group, add the given HTML code depending on the block type
<nvlist_conditional by="block" type="blog_archive"><[blog archive nvtag]</nvlist_conditional>
|
- type
- linked
- [true | false]
- add the given HTML code depending if the block has a link to be opened on click
|
block_type
|
when parsing a block group, add the given HTML code if we are processing a certain block type zone
<nvlist_conditional by="block_type" type="sidebar_content"><[conditional fragment]</nvlist_conditional>
|
|
gallery
|
add the given HTML code depending if the content has a non-empty gallery
<nvlist_conditional by="gallery" empty="false"><[gallery enabled nvtag]</nvlist_conditional>
|
|
tags
|
add the given HTML code depending if the content has tags assigned
<nvlist_conditional by="tags" empty="false"><[html code when there are tags]</nvlist_conditional>
|
|
structure
|
add the code fragment depending if the category on this iteration is marked as visible in the menu
<nvlist_conditional by="structure" show_in_menus="true"><[html code or nv tags]</nvlist_conditional>
|
|
comment
|
add the code fragment depending if the comment on this iteration satisfies the check
<nvlist_conditional by="comment" check="website" empty="false" ><[html code or nv tags]</nvlist_conditional>
|
- check
- website
- the comment (or its author) has a related website url
- empty
- [ true | false ]
- checks if the field value is empty or not
|
query
|
add the given HTML code only when the SQL query result satisfies a certain condition
<nvlist_conditional by="query" check="field" field="fieldname"><div class="special-field">{{nvlist source='query' value='fieldname'}}</div></nvlist_conditional>
<nvlist_conditional by="query" check="field_range" field="distance" max="10000"><div class="distance">{{nvlist source='query' value='distance'}} meters</div></nvlist_conditional>
|
- check
- field
- check if the query has returned a value for the field/column specified in "field" attribute
- field_range
- check if the query value for a "field" is between a "min" and "max" value (both are optional)
|
property
|
add the given HTML code only when a property has a certain value
<nvlist_conditional by="property" property_id="blog_entry_type" property_value="video"><div class="video"></div></nvlist_conditional>
<nvlist_conditional by="property" property_id="display_author" property_value="yes"><div class="entry-author">{{nvlist source='item' value='author'}}</div></nvlist_conditional>
<nvlist_conditional by="property" property_id="event_date" property_compare="gt" property_value="today"><div>future event</div></nvlist_conditional>
|
- property_id / property_name (both are valid)
- the name of the property to check
- property_empty
- [ true | false ]
- instead of comparing a value, check if the property is empty or not
- property_value
- the value to match or compare against
- today: check if the property date is today (00-24h)
- property_compare
- specify how to compare the real value against the one given to determine the validity of the conditional
- eq or = (default)
- neq or !=
- gt or >
- gte or >=
- lt or <
- lte or <=
|