^
 
nv tags reference
core objects nvweb widgets list / search

<nv object="..." />

{{nv object='...'}}

root

absolute url of the website <nv object="root" />  

dictionary

get a translated string from the website or theme dictionary <nv object="dictionary" id="1" default="Default text" />
<nv object="dictionary" id="signin" default="Sign in" />
  • id
    • numeric ID of the word in the website dictionary
    • string representing the word in the theme dictionary
  • default
    • default string used when the ID is not found
  • type
    • [ structure | item ]
      retrieve the title of a category or element by checking the id field, which can contain a numeric ID or the name of the property which has the relation

url

relative url of a certain item or structure element <nv object="url" />
<nv object="url" type="item" id="123" />
{{nv object='url' type='structure' id="12"}}
{{nv object='url' type='theme' id='search'}}
<nv object="url" type="item" id="123" lang="en" />
<nv object="url" type="structure" property="special_category" />
  • (no parameters)
    • returns the current url (without variables)
  • type
    • [ item | structure | theme ] kind of element to get its url
  • id
    • numeric ID of the element (if empty the current one is used)
    • the template name (will find the first item using that template) (type="theme" only)
  • property
    • ID of the property which contains the value needed to find the link (element ID or structure ID)
      (if property is given, "id" parameter is ignored)
  • lang
    • force return a url in a certain language, if empty the current one is used

php

execute some basic php code <nv object="php" code="date('Y/m/d H:i:s');" />
{{nv object='php' code='var_dump("test");'}}
  • code
    • php code to execute

include

load a segmented/partial template <nv object="include" id="8" />
<nv object="include" file="footer.nvt.html" />
  • id
    • numeric ID of the template in Navigate CMS
  • file
    • name of the file within the theme used in a website

variable


constant

return the value of a constant <nv object="variable" name="year" />
{{nv object='variable' name='structure'}}
<nv object="variable" name="lang_code" />
  • name
    • structure
      • retrieve the ID of the current structure item
    • year
      • 4-digits of the current year
    • website_name
      • name of the website
    • website_description
      • custom text describing the website
    • lang_code
      • 2-letters of the current loaded language

request

return the value of a request field <nv object="request" name="email-address" />
  • name
    • name of the field sent by a form (GET or POST)

theme

return a value related to the current theme {{nv object='theme' mode='style'}}
<nv object="theme" mode="style" name="global" />
{{nv object='theme' mode='url'}}
  • url
    • absolute path to the theme root folder
  • style
    • information about the current theme style
      • (empty)
        • internal codename of the style
      • name
        • global, color, (your own css_substyle_name)
          • path to the CSS file for the current css substyle
            example: { "blue": { global: "css/blue/global.css" } }

nvweb

execute a Navigate CMS or website theme widget <nv object="nvweb" name="metatags" />
  • name
    • name of the widget
reference

nvajax

absolute url of the theme AJAX <nv object="nvajax" />
  • navigate will try to run the function "nvweb_themename_nvajax", if exists

list


search

find items and render them with the given HTML snippet <nv object="list" items="10" paginator="true">html code</nv>
  • note that list/search and conditional are the only nv tags that need to be closed independently (no short tag syntax!)

reference


<nv object="nvweb" name="..." />

{{nv object='nvweb' name='...'}}

archive

generate a list of months with number of entries posted in a category

when clicked takes the browser to a search-enabled page
<nv object="nvweb" name="archive" mode="month" search_page_type="theme" search_page_id="archive.nvt.html" />

{{nv object='nvweb' name='archive' mode='adaptive' categories='1,2,3' search_page_type='structure' search_page_id='99'}}
  • mode
    • adaptive
      • show entries by month or year/month depending on number of results
    • month
      • show entries by month
    • year
      • show entries by year and month
  • collapsed
    • [ false | true ]
      • when using "year" mode, hide all months, including the ones from the present year
  • categories
    • comma-separated IDs of the structure entries to look for
      property id where the category id is defined
      if empty, only the current category is used
      • (in this case, children categories are included by default)
  • children
    • [ true | false ]
      • if enabled the elements in subcategories will be counted
      • if disabled only the current structure category will be processed
  • search_page_type
    • [ structure | item | theme ]
      • where to find the search page
  • search_page_id
    • id of the search page element (structure or item) in Navigate CMS
    • name of the search page file included in the current theme

blocks

generate a number of HTML blocks of a certain type

very useful for banners and sidebars
<nv object="nvweb" name="blocks" type="header-banner" mode="random" number="1" />

{{nv object='nvweb' name='blocks' type='sidebar-widget' mode='ordered' zone='content'}}
  • type
    • codename of the block type (given in Navigate CMS or in a theme)
  • mode
    • ordered
      • show blocks ordered by priority (given in Navigate CMS)
    • random
      • show blocks in random order
    • single
      • show only one block (needs "id" attribute)
  • number
    • number of blocks to retrieve
  • position
    • position of which block to return in a sequence
      • (for mode="single" or mode="ordered" with number="1")
  • id
    • numeric id of the block to retrieve from Navigate CMS
  • categories
    • force retrieving blocks associated to certain categories, no matter the current one
      example: categories="13,34,56"
  • zone
    • [ block | title | content ]
      • block: generate the full block (content+action)
      • title: returns the block title
      • content: return only the block content (without the action)
  • 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">

breadcrumbs

generate a trail of links from the current category to the root <nv object="nvweb" name="breadcrumbs" />
{{nv object='nvweb' name='breadcrumbs' separator='&nbsp;&gt;&nbsp;'}}
<nv object="nvweb" name="breadcrumbs" separator=" - " from="1" />
<nv object="nvweb" name="breadcrumbs" separator="image" image="img/dot.png" />
  • separator
    • text between breadcrumbs trails
      if the text is "image", then an image tag is created
      if is "base64", then the base64 attribute will be decoded an used as a separator
  • image
    • path to image used as separator (needs separator="image")
  • base64
    • html code encoded in base64
  • from
    • set the first level to show (0 => root, 1 => first level, etc.)
  • links
    • [ true | false ]
      • each part of the path is a link (default) or just want the title alone

comments

helper to control the comments workflow on a webpage.

you can also use a <nv object="list" /> to achieve complete customization on showing comments.
<nv object="nvweb" name="comments" mode="process" notify="inline" />

{{nv object='nvweb' name='comments' mode='reply'}}

<nv object="nvweb" name="comments" mode="comments" date_format="%d %B %Y %H:%M" avatar_size="48" order="newest" />

<nv object="nvweb" name="comments" mode="comments" order="hierarchy_oldest" />

{{nv object='nvweb' name='comments' mode='process' field-name='new-comment-name' field-email='new-comment-email' field-url='new-comment-url' field-message='new-comment-message' notify='callback' callback='comment_success_message' callback_error='comment_error_message'}}
  • mode
    • process
      • checks if the visitor has sent a new comment, notifying the result
    • reply
      • generates a "new comment" form (detecting logged in webusers)
    • comments
      • show all comments related to the current item
  • date_format
  • avatar_size
    • size in pixels for the webuser avatars
  • order
    • [ oldest | newest | hierachy_oldest | hierarchy_newest ]
  • field-name, field-email, field-url, field-message,
    field-subscribe, field-reply_to
    • use these attributes to give the names of the fields that your own form is sending with the following new comment data (used only in "process" mode): name, email, url, message, user wants to subscribe[value=1], id of the comment that is begin replied
      note: when the user is already identified, display only the message field; please use <nv object="conditional" by="webuser" signed_in="false"> to hide the other fields in your form
  • field-properties-prefix
    • indicates the prefix of the submitted fields that contain values for the properties of the comment
      example: field-properties-prefix="comment-property-"; <input type="hidden" name="comment-property-rating" value="5" />
  • notify
    • how to display the process result:
      • callback
        • (default) call a javascript function with the result string as a parameter
      • inline
        • embed the result string in a div tag (with class "comment-success" or "comment-error")
  • callback
    • call a function after trying to insert a new comment;
      the function has to accept only one parameter: a text message (defaults to "alert")
  • callback_error
    • (your own callback, p.e. "$.prompt"; defaults to "alert")
      • call your own function when the comment could not be saved, it only needs to treat one parameter: the result string
        ex.: $.prompt(argv[0]);
        note: if you don't set an "callback_error", the "callback" method you chose will be used instead
  • element
    • used in PHP code, content element where the comment is included

conditional

check a condition to include or not a certain html code; only applies to the current page element (NOT lists) <nv object="conditional" by="property" property_name="post_type" property_value="video">
<span>video title:</span>
{{nv object='nvweb' name='properties' property='post_video' return='title'}}
</nv>
  • by
    • property
      • include the fragment only if a certain property has a certain value
    • template, templates
      • include the fragment only if the current element uses a certain template
    • webuser
      • include the fragment only if a webuser is signed in or not (needs "signed_in" attribute)
    • comments
      • include the fragment only if comments are allowed on the current element (needs "allowed" attribute)
    • language
      • include the fragment only if the current website language matches the one given in the condition (needs "lang" attribute)
    • languages
      • include the fragment only if the number of enabled website languages is between the minimum and maximum given in the condition
    • gallery
      • include the fragment only if the content satisfies a condition over its gallery (exists or min/max elements)
    • section
      • include the fragment only if a section of the content satisfies a condition
    • tags
      • include the fragment only if the content has labels or not
    • access
      • add the given fragment depending on the visitor access level
  • scope
    • [ element | structure ]
      • when displaying a page from a structure category, force checks to be against the same structure object (default) or to the first element assigned to that category
  • property_name
    • property name to check
  • property_value
    • value of the property given in "property_name"
  • property_empty
    • [ true | false ]
      • instead of comparing a value, check if the property is empty or not
  • property_scope
    • [ element | structure | website ]
      • force reading a property from a specific object
  • section
    • code of the element's section where to check de condition
  • template
    • name or numeric identifier of the template which the element must use
  • templates
    • templates list (separated by commas) which can be used by the element to fulfill the condition
  • signed_in
    • [ true | false ]
      • check if the webuser is signed in or not
  • categories
    • numeric identifiers of the categories (separated by commas) where to find the first element which will be checked against the condition
      (useful when the current page does not belong to a particular element and you want to define a concrete origin)
  • allowed
    • [ true | false ]
      check if the current visitor is allowed to post comments on the current element
  • order
    • [ newest | priority | oldest | future | alphabetical | reverse_alphabetical | random | rating | votes | views ]
      which order has to be applied when searching the element against which the condition will be checked
  • lang
    • (language code)
      apply the condition only if matches with the current website language (to be used with by="language")
  • empty
    • [ true | false ]
      apply the condition only if it empty or not (to be used with by="gallery", "tags" or "section")
  • min
    • (number)
      (by="languages") minimum number of languages enabled in the website to satisfy the condition
      (by="gallery") minimum number of images that the current element's gallery must have to satisfy the condition
      (by="comments") minimum number of comment that must have the current element
  • max
    • (number)
      (by="languages") maximum number of languages enabled in the website to satisfy the condition
      (by="gallery") maximum number of images that the current element's gallery must have to satisfy the condition
      (by="comments") maximum number of comment that must have the current element
  • access
    • [ everyone | signed_in | not_signed_in | webuser_groups | navigate_user ]

contact

eases sending e-mails from the contact forms of the websites

recipients are declared in the website configuration in Navigate CMS
<nv object="nvweb" name="contact" mode="send" fields="name,email,message" labels="Name,E-Mail,Message" form="form_type=unique_value" />

{{nv object='nvweb' name='contact' mode='send' fields='Full name,E-Mail,Message' labels='Name,E-Mail,Message' notify='inline'}}

<nv object="nvweb" name="contact" mode="send" fields="name,email,message" labels="Name,E-Mail,Message" required="email,message" notify="$.prompt" />
  • mode
    • send
      • try to send the contact e-mail (if the form is already sent)
  • fields
    • list of field names to be treated
  • labels
    • list of field titles to show
  • required
    • list of field names which cannot be left blank
  • subject
    • defines email subject (website name is auto added at the beginning)
  • form
    • send form email only if "field_name=field_value" condition applies
      (if you have several forms on a single page which use the contact webget)
      example: <input type="hidden" name="form_type" value="unique_value" />
  • notify
    • alert
      • show a javascript alert
    • inline
      • replace the webget call with the result string
    • (your own callback, p.e. "$.prompt")
      • call your own function, it only needs to treat one parameter: the result string
        Example: $.prompt("Message sent.");
  • error_callback
    • (your own callback, p.e. "$.prompt")
      • call your own function when the email could not be sent, it only needs to treat one parameter: the result string
        ex.: $.prompt(argv[0]);
        note: if you don't give an "error_callback", the "notify" method you chose will be used instead

content

return some section of the content
(when the current page belongs to an item)
<nv object="nvweb" name="content" mode="body" />

{{nv object='nvweb' name='content' mode='date_post' format='%c'}}

<nv object="nvweb" name="content" mode="structure" return="title" />

{{nv object='nvweb' name='content' mode='title' function='strtolower'}}

  • mode
    • title
      • title of the item
    • body
      • return the main section of the item
    • section
      • return a content section of the item
    • summary
      • return a fragment of the main item's content
        • length
          • maximum number of chars (followed by …)
    • date
      • date of the item (assigned value on date to display)
    • date_created
      • creation date of the item
    • comments
      • number of comments attached to the item
    • views
      • number of views of the item
    • author
      • name of the Navigate CMS user who created that content
    • structure
      • retrieve something about the item's parent (check the "return" attribute)
    • tags
      • return the list of tags associated to the item
        • separator
          • string to be used as a separator for each tag
  • section
    • name of the item's section to return ("main", "custom_section_1", etc.)
  • function
    • php function that will be called: strtoupper, ucfirst... (only for "title" mode)
  • format
    • date format using PHP strftime parameters, if empty the website's default format is used
  • return
    • title
      • title of the item's structure element
    • path
      • relative path of the item's structure element
    • action
      • action of the item's structure element

gallery

create an image gallery / slideshow <nv object="nvweb" name="gallery" mode="image" position="3" width="120" height="90" border="false" />

{{nv object='nvweb' name='gallery' mode='prettyphoto' width='132' height='99'}}

<nv object="nvweb" name="gallery" mode="images" border="true" />
  • mode
    • image
      • first image of the gallery of the current page item
    • images
      • plain img tags for all images in the gallery
    • prettyphoto
      • generated HTML code for a gallery using prettyphoto
        (prettyphoto must be loaded and called manually)
    • greybox
      • generated HTML & JS code for a gallery using greybox
    • piecemaker
      • generated XML "Image Source" tags for use with piecemaker 2
  • only_first
    • [ true | false ] (only for mode="prettyphoto")
      • display only the first image, the remaining are there but hidden (display: none)
  • width
    • width of the gallery thumbnails (original image will be shown in full size)
  • height
    • height of the gallery thumbnails (original image will be shown in full size)
  • border
    • true
      • the generated thumbnails are scaled with transparent borders
    • false
      • the generated thumbnails are zoomed in to avoid transparent borders
  • return
    • thumbnail
      • returns an img tag with the thumbnail (only for mode="image")
    • url / path
      • returns an absolute url to the full image (only for mode="image")
  • order
    • [ priority | random ]
      • specify the order of the images of the gallery
  • position
    • return the image placed in a certain position of the gallery (only for mode="image")
  • item
    • numeric ID (or php object) of the element to get the gallery from

languages

display a list of languages available for a website <nv object="nvweb" name="languages" mode="code" />
<nv object="nvweb" name="languages" mode="select" />
{{nv object='nvweb' name='languages' mode='name' separator=' | ' class='language-option'}}
<nv object="nvweb" name="languages" mode="flag" separator="&nbsp;" />
  • mode
    • code
      • list of language codes (en, es_ES, fr_CA...)
    • select
      • select control with language names (English, Spanish (ES), French (CA)...)
    • name
      • list of links of language names (English, Spanish (ES), French (CA)...)
    • flag (not recommended)
      • icons of country language flags (famfamfam)
  • separator
    • html string that will be placed between language options (will be added in a <span> tag)
  • class
    • classname added to each language option (or the <select> tag in case of mode="select")

liveedit

display a bar on the top of the page to allow modifying the current content (only for Navigate CMS logged in users) <nv object="nvweb" name="liveedit" />

menu

show a list of menu (structure) elements <nv object="nvweb" name="menu" mode="ul" />

{{nv object='nvweb' name='menu' mode='a' levels='1' from='0' option='3' }}

<nv object="nvweb" name="menu" mode="ul" levels="1" from="1" of="1" />

<nv object="nvweb" name="menu" mode="current_title" />
  • mode
    • ul
      • create UL > LI elements (and children, if enabled)
    • a
      • create DIV > A elements (div class hints the structure level)
    • select
      • create SELECT > OPTION elements ("selected" hints the structure level)
    • previous
      • link to the previous content in the current category (if available)
    • next
      • link to the next content in the current category (if available)
    • current_title (also "category_title")
      • retrieve the current structure element title
    • category_url
      • retrieve the current structure element url
  • levels
    • how many levels are retrieved (0 => all)
  • from
    • from which structure level we have to start (0 => from root)
  • of
    • get childs of a certain position of a root element (0 => all root elements)
  • parent
    • ID of a structure parent (given in Navigate CMS) (0 => root element)
  • option
    • get a specific child of the first structure level returned
  • class
    • assign a CSS class to the menu wrapper tag (the div, ul or select)

metatags

generate HTML metatags based on content <nv object="nvweb" name="metatags" />
  • generator
    • [ true | false ]
      • include a "generator" "Navigate CMS" metatag
  • title_separator
    • string to be used as separator between page title and website name

properties

show a property of the current page <nv object="nvweb" name="properties" property="Main image" width="250" height="180" border="false" />

{{nv object='nvweb' name='properties' property='Date of the event' mode='item' id='123'}}

<nv object="nvweb" name="properties" property="SKU" />

<nv object="nvweb" name="properties" property="related_item" return="title" />

<nv object="nvweb" name="properties" property="related_item" return="section" section="main" />

<nv object="nvweb" name="properties" property="related_item" return="property" element-property="main_image" element-property-width="64" element-property-height="64" element-property-border="false" />
  • property
    • EXACT property name (case sensitive)
      ID of the property (given in the website theme definition)
  • mode
    • [ website | item | structure ]
      • force retrieving the property value from the website or an item or structure element
  • id
    • ID of the item or structure element to retrieve the property from
  • format
    • strftime date format (only for "date" and "datetime" property types)
  • link
    • [true | false] return an <a> tag or just the url (only for "link" property type)
  • floor
    • [true | false] calculate nearest integer down (only for "rating" property type)
  • width
    • width of an image (only for "image" and "video" property types)
  • height
    • height of an image (only for "image" and "video" property types)
  • border
    • [ true | false ]
      • resized image is scaled with transparent borders or zoomed in to avoid any border (only for "image" property type)
  • precision
    • define how many decimal digits should be returned for a decimal property (default is return the whole numeric value)
  • return
    • return a value related to a property by its type
      • properties of type "image"
        • url
          • URL of an image, not the full <img> tag
        • quality
          • set quality percentage when scaling JPEG images
      • properties of type "item"
        • id
        • title
        • path, url
          • item url
        • section
          • section="main"
              codename of the section to return
        • property
          • element-property
              codename of the property to return from the element
          • element-property-{modifier_attribute}
              prefix "element-property-" to any property attribute to process; for example: element-property-width="80"
      • properties of type "file"
        • url
        • url-inline
        • url-download
      • properties of type "option" and "moption"
        • value
      • properties of type "link"
        • title
        • link
        • target
      • properties of type "category"
        • title
        • url
      • properties of type "categories"
        • title (based on required attribute "position")
        • url (based on required attribute "position")
      • properties of type "country"
        • id
        • code
        • name
      • properties of type "video"
        • embed
          • HTML embedding code
        • title
        • provider
          • youtube, vimeo...
        • reference
          • video reference in the provider platform
        • mime
        • author
          • uploader or video author
        • path, url
          • video source path
        • thumbnail_url
        • thumbnail
          • image tag for video thumbnail

tags

display a list of tags used on the website <nv object="nvweb" name="tags" mode="top" />
{{nv object='nvweb' name='tags' mode='top' tag='li'}}
<nv object="nvweb" name="tags" mode="top" tag="a" number="5" separator=" | " />
  • mode
    • top
      • order tags by usage
    • random
      • randomize tags order
  • tag
    • [ a | li | span ]
      • which html tag we want to use for every label
  • separator
    • string to be used as separator between tags
  • items
    • number of tags to return
  • categories
    • retrieve tags only from certain structure elements, for example: "4,8"
  • class
    • assign a CSS class to every link
  • request
    • parameter name for the URL that will be used to perform the search (defaults to "q")

votes

retrieve information on item votes and score <nv object="nvweb" name="votes" mode="webuser" />

{{nv object='nvweb' name='votes' mode='score' round='1' max='10' min='1'}}

<nv object="nvweb" name="votes" mode="votes" />
  • mode
    • votes
      • number of votes received by this item
    • score
      • average score received by this item
    • webuser
      • score given by the webuser signed in
  • round
    • (only for "score" mode)
      floor
      • nearest integer down
    • ceil
      • nearest integer up
    • 2 (or any other integer)
      • number of decimals of the average score
  • half
    • divide the score by 2, i.e. if you don't want "half stars" (only for "score" mode)
  • min
    • minimum value allowed (only for "score" mode)
  • max
    • maximum value allowed (only for "score" mode)

webuser

displays data of the signed in webuser or makes an action over him <nv object="nvweb" name="webuser" mode="username" />

{{nv object='nvweb' name='webuser' mode='authenticate' username_field='signin_username' password_field='signin_password' notify='inline'}}

<nv object="nvweb" name="webuser" mode="newsletter_subscribe" email_field="newsletter_subscribe_email" notify="callback" callback="newsletter_subscription_callback" />
  • mode
    • id
      • webuser numeric identifier
    • username
      • username of the webuser
    • fullname
      • webuser real name
    • email
      • webuser email
    • avatar
      • webuser image
    • comments
      • number of comments posted
    • gender
      • return the gender of the webuser [ male / female / company / (empty) ]
    • newsletter
      • return if the webuser is subscribed to the newsletter [ 0: no, 1: yes ]
    • authenticate
      • try to authenticate the webuser after entering username and password
    • signout_link
      • generates an url to close the session started by a webuser
    • newsletter_subscribe
      • try to subscribe an email as a newsletter receiver
    • forgot_password
      • send an e-mail to reset the webuser's password
  • username_field
    • (only for mode="authenticate")
      name of the field in the sent form which contains the username; default is "signin_username"
  • password_field
    • (only for mode="authenticate")
      name of the field in the sent form which contains the password; default is "signin_password"
  • email_field
    • (only for mode="newsletter_subscribe" and "forgot_password")
      name of the field in the sent form which contains the email address; default is "newsletter_email"
  • notify
    • (only for mode="authenticate", "newsletter_subscribe" and "forgot_password")
      how to notify the result of the process
      • inline
        • result is displayed in the webget calling place
      • alert
        • result is displayed in an browser "alert" dialog
      • callback
        • result is passed to a callback function (defined with the attribute "callback")
      • false
        • result is ignored
  • callback
    • (only for notify="callback")
      positive result is passed as a parameter of a javascript function
  • error_callback
    • (only for notify="callback")
      error result is passed as a parameter of a javascript function
  • form
    • send form email only if "field_name=field_value" condition applies
      (if you have several forms on a single page which use the webget mode="newsletter_subscribe")
      example: <input type="hidden" name="form_type" value="unique_value" />
  • 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
    • gravatar_default
      • gravatar type to use by default when the user has not defined a custom avatar


<nv object="list" >..</nv><nv object="search" >..</nv>

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)
          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
    • item date published
      • format
  • section / content
    • item content section
      • section
        • item section's code
      • 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 has 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

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
    • comment date posted
      • format
  • 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
    • structure element title
  • slug
    • simplified name based on the title
  • url / path
    • relative path of the structure element
  • count
    • number of children this category has
  • property
    • retrieve a property of the structure element
      use same attributes as in properties (nvweb)

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
    • title given to the block
  • 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
    • retrieve a property of the structure element
      use same attributes as in properties (nvweb)
  • 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
    • url assigned to the link
  • 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
    • type of the block
  • 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>
  • type
    • block type code

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>
  • empty
    • [ true | false ]

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>
  • empty
    • [ true | false ]

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"><[código html o nv tags]</nvlist_conditional>
  • show_in_menus
    • [ true | false ]

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 two values to determine the validity of the conditional
      • eq or = (default)
        • equal
      • neq or !=
        • not equal
      • gt or >
        • greater than
      • gte or >=
        • greater than or equal
      • lt or <
        • lower than
      • lte or <=
        • lower than or equal
{nv tags reference} {full documentation}

© 2012-2017, Naviwebs