Template Parser

This way of template customisation is obsolote and will work only on webpages of in classic wwwroot-folder!

This information is only available in English.

The document describes the behavior and options of the Template Parser rendering the estos MetaDirectory WebServer templates. It gives you a short introduction on how the parser handles commands and which options come along with the command. Even if there are short samples included you will understand the context much better if you take a closer look at the templates which come along with the estos MetaDirectory.

Parser behavior

Every whitespace will be deleted during parsing of the template file.
If you feel you are in need of a whitespace use instead.
This was done to speedup the page transfer

Command composition

Each parser command has the following layout:
 
<!-- < fieldname attribute="value" attribute="value" att..>-->
 
The fieldname describes the databasefield. The attributes how the field, the data and associated fieldname have to be parsed.

Known estos MetaDirectory databasefields
CommandDatabasefieldLDAP Field
<!-- <Databasename/> -->Database namedatabaseName
<!-- <Distinguishedname/> -->Distinguished namedistinguishedName
<!-- <DatabaseID/> -->DatabaseIDentryIDDB
<!-- <StoreID/> -->StoreIDentryIDStore
<!-- <EntryID/> -->EntryIDentryID
<!-- <Displayname/> -->Display namedisplayName
<!-- <Firstname/> -->First namegivenName
<!-- <Lastname/> -->Last namesn
<!-- <Title/> -->Titletitle
<!-- <Company/> -->Companycompany
<!-- <Department/> -->Departmentdepartment
<!-- <Officeroomnumber/> -->Office room numberphysicalDeliveryOfficeName
<!-- <Businessaddressstreet/> -->Business address streetstreetAddress
<!-- <Businessaddresspostalcode/> -->Business address postal codepostalCode
<!-- <Businessaddresscity/> -->Business address cityl
<!-- <Businessaddressstate/> -->Business address statest
<!-- <Businessaddresscountry/> -->Business address countryc
<!-- <Privateaddressstreet/> -->Private address streetprivateAddressStreet
<!-- <Privateaddresspostalcode/> -->Private address postal codeprivateAddressPostalCode
<!-- <Privateaddresscity/> -->Private address cityprivateAddressCity
<!-- <Privateaddressstate/> -->Private address stateprivateAddressState
<!-- <Privateaddresscountry/> -->Private address countryprivateAddressCountry
<!-- <Otheraddressstreet/> -->Other address streetotherAddressStreet
<!-- <Otheraddresspostalcode/> -->Other address postal codeotherAddressPostalCode
<!-- <Otheraddresscity/> -->Other address cityotherAddressCity
<!-- <Otheraddressstate/> -->Other address stateotherAddressState
<!-- <Otheraddresscountry/> -->Other address countryotherAddressCountry
<!-- <EMail/> -->E-Mailmail
<!-- <EMail2/> -->E-Mail 2mail2
<!-- <EMail3/> -->E-Mail 3mail3
<!-- <SIPadress/> -->SIP adresssipAddress
<!-- <WebpageURL/> -->Web page URLurl
<!-- <Phonebusiness/> -->Phone businesstelephoneNumber
<!-- <Phonebusiness2/> -->Phone business 2otherTelephone
<!-- <Companymaintelephone/> -->Company main telephonetelephoneNumberCompanyMain
<!-- <Assistanttelephone/> -->Assistant telephonetelephoneAssistant
<!-- <Phonehome/> -->Phone homehomephone
<!-- <Phonehome2/> -->Phone home 2otherHomePhone
<!-- <Primarytelephone/> -->Primary telephonetelephonePrimary
<!-- <Phonemobile/> -->Phone mobilemobile
<!-- <Cartelephone/> -->Car telephonetelephoneCar
<!-- <Radiotelephone/> -->Radio telephonetelephoneRadio
<!-- <Phonepager/> -->Phone pagerpager
<!-- <Callbacktelephone/> -->Callback telephonetelephoneCallback
<!-- <ISDNtelephone/> -->ISDN telephonetelephoneISDN
<!-- <TTYTTDtelephone/> -->TTYTTD telephonetelephoneTTYTTD
<!-- <Facsimilebusiness/> -->Facsimile businessfacsimileTelephoneNumber
<!-- <Facsimilehome/> -->Facsimile homeotherFacsimileTelephoneNumber
<!-- <CustomerID/> -->Customer IDcustomerid
<!-- <Directweblink/> -->Direct web linkdirectWebLink
<!-- <Directopencontact/> -->Direct open contactdirectOpenContact
<!-- <Comment/> -->Commentinfo
<!-- <Custom0/> -->Custom 0custom0
<!-- <Custom1/> -->Custom 1custom1
<!-- <Custom2/> -->Custom 2custom2
<!-- <Custom3/> -->Custom 3custom3
<!-- <Custom4/> -->Custom 4custom4
<!-- <Custom5/> -->Custom 5custom5
<!-- <Custom6/> -->Custom 6custom6
<!-- <Custom7/> -->Custom 7custom7
<!-- <Custom8/> -->Custom 8custom8
<!-- <Custom9/> -->Custom 9custom9
<!-- <ContactURL/> -->URL to edit the contactcontactURL
<!-- <ContactURLDescription/> -->Description for the 1. contactURLcontactURLDescription
<!-- <ContactURL2/> -->2. URL to open the contactcontactURL2
<!-- <ContactURLDescription2/> -->Description for contactURL2contactURLDescription2
<!-- <ContactURL3/> -->3. URL to open the contactcontactURL3
<!-- <ContactURLDescription3/> -->Description for contactURL3contactURLDescription3
<!-- <ContactPictureMeta/> -->Embets the picture for this contactjpegPhoto
<!-- <ContactPicturePath/> -->Contains a path to the picture if configured within the replicatorimagePath


Parser commands and attributes
CommandPossible valuesDescription
fieldvalue 0/1
<!-- <LastName fieldvalue="1"/> -->
Smith

The parser drops the associated field value

fieldname 0/1
<!-- <LastName fieldname="1"/> -->
Last name

The parser drops the associated field name in the corresponding language the user is viewing the page

skipifemptyvalue 0/1
<!-- <LastName skipifemptyvalue="1" fieldname="1" fieldvalue="1"/> -->
If LastName exists in the database:
Last name:Smith

If the LastName is empty the parser will not add "Last name:" to the output

formatvalue The parser formats the fieldvalue according to the format specified within possible values
plain
<!-- <Company fieldvalue="1" formatvalue="plain" /> -->
+4912345678
phonelink
<!-- <Phonebusiness fieldvalue="1" formatvalue="phonelink" /> -->
+4912345678

It is possible to define the phonelink handler in the estos MetaDirectory administrator.

maillink
<!-- <EMail fieldvalue="1" formatvalue="maillink" /> -->
info@estos.de
siplink
<!-- <Custom0 fieldvalue="1" formatvalue="siplink" /> -->
info@estos.de
httplink
<!-- <WebPageURL fieldvalue="1" formatvalue="httplink" /> -->
https://www.estos.de/
uri
<!-- <WebPageURL fieldvalue="1" formatvalue="uri" /> -->
Format as plain a href without additional formatting.
uriblank
<!-- <WebPageURL fieldvalue="1" formatvalue="uriblank" /> -->
Format as plain a href with target='_blank' without additional formatting.
custom
<!-- <Custom0 formatvalue="custom" customformat="<a href='http://intranet/accounting/opencontact.php?%value%&view=1'>Open customer accounting</a>"/> -->
Open customer accounting

You can easily connect your webbased crm software using custom links
You can use the following placeholders to get the apropriate data:

  • %name% - for the field name
  • %value% - for the field value
  • %phonelink% - for the dial handler prefix
prefix any
apart <!-- or -->
<!-- <LastName fieldname="1" prefix="<b>"/> -->
Last name

The parser adds a prefix to the value and or name content

suffix any
apart <!-- or -->
<!-- <LastName fieldvalue="1" suffix="..."/> -->
Smith...

The parser adds a suffix to the value and or name content

prefixname any
apart <!-- or -->
<!-- <LastName fieldname="1" prefixname="->"/> -->
->Last name

The parser adds a prefix to the name of the database field

suffixname any
apart <!-- or -->
<!-- <LastName fieldname="1" fieldvalue="1" suffixname=": "/> -->
Last name: Smith

The parser adds a suffix to the name of the database field

prefixvalue any
apart <!-- or -->
<!-- <LastName fieldname="1" fieldvalue="1" prefixvalue=": "/> -->
Last name: Smith

The parser adds a prefix to the value of the database field

suffixvalue any
apart <!-- or -->
<!-- <LastName fieldvalue="1" suffixvalue="..."/> -->
Smith...

The parser adds a suffix to the value of the database field

prefixvaluenotempty any
apart <!-- or -->
<!-- <LastName fieldname="1" fieldvalue="1" prefixvaluenotempty=": "/> -->
Last name: Smith

The parser adds a prefix to the value of the database field if it is not empty

suffixvaluenotempty any
apart <!-- or -->
<!-- <LastName fieldvalue="1" suffixvaluenotempty="..."/> -->
Smith...

The parser adds a suffix to the value of the database field if it is not empty

configvalue any
apart <!-- or -->
<!-- <fullresulttemplate configvalue="fullresult"/> -->
This attribute contains a special configuration value for the server. This attribute is used for configuration of the mail page template.
limitvaluelength Integer 1 - n
<!-- <LastName fieldvalue="1" limitvaluelength="32"/> -->
Limit the length of the result value.
encoding one of
htmlansi|url|xml
<!-- <Displayname encoding="htmlansi" fieldname="1"/> -->
Encode data for html, url or xml output.

Conditional statements
TagDescription
if
<!-- <if condition="1"/> -->
The condition is evaluated and the following text block will be included if the statement evaluates to 1.
All Fields from the template parser are available in the statement.

Examples:
<!-- <if condition="UserAgent=='*Mozilla*'"/> -->
<!-- <endif/> -->
<!-- <if condition="Lastname=='Anders*' AND Firstname=='Tom*'"/> -->
<!-- <endif/> -->
elseif
<!-- <elseif condition="1"/> -->
The condition is evaluated and the following text block will be included if the statement evaluates to 1.

Examples:
<!-- <if condition="UserAgent=='*Mozilla*'"/> -->
<!-- <elseif condition="UserAgent=='*Opera*''"/> -->
<!-- <endif/> -->
else
<!-- <else/> -->
The following text block will be included if the corresponding if statement did not evaluate to 1.

Examples:
<!-- <if condition="UserAgent=='*Mozilla*'"/> -->
<!-- <else/> -->
<!-- <endif/> -->
endif
<!-- <endif/> -->
Marks the end of the if condition text block.

Version 6