Search
Friday, February 23, 2018
User manualsEasyDNNnews

EasyDNNnews User's manual

Custom fields tokens in HTML templates

Previous Article Search fields and advanced article search
Next Article Localization of custom fields

Custom fields tokens in HTML templates

Custom fields are displayed in articles with tokens in the HTML templates. There is a shared token [EDNcf:ShowAll] that displays a whole custom field group on the position of the token. Besides a joint token that displays a whole custom field group, it is possible to use individual tokens for each field.

You can find individual tokens for each custom field in EasyDNNnews > Dashboard > Edit Custom Fields. Next to each custom field, its token is listed.

An example:

[EDNcf:price] – displays the value of the custom field price
[EDNcf:price:showlabel:default] – displays the label and value of the custom field price
[EDNcf:price:showlabel:onlylabel] – displays only the label of the custom field price

Conditional tokens:

[EDNcf:IfExists:TokenName] [EDNcf:EndIf:TokenName] 
- if the custom field value exists then the content between these two tokens is displayed

[EDNcf:IfNotExists:TokenName] [EDNcf:EndIf:TokenName]
- if the custom field value does not exist then the content between these two tokes is displayed

 

Custom fields expression tokens

The custom fields expression tokens check values in custom field values in templates.

[EDNcf:Expression:CustomFieldTokenID:operator:value]

[EDNcf:EndExpression:CustomFieldTokenID]

operator: =, !=, >, >=, <, <=

value: value to compare

 

Examples:

[EDNcf:Expression:Price:<:20]
Price is less than 20.
[EDNcf:EndExpression:Price]

[EDNcf:Expression:Available:=:true]
Product is available
[EDNcf:EndExpression:Available]

Previous Article Search fields and advanced article search
Next Article Localization of custom fields
Print
Last update: 15.01.2018 / Rate this article:
5.0

Name:
Email:
Subject:
Message:
x

Table Of Contents

Copyright 2018 by EasyDNNsolutions Terms Of Use Privacy Statement