This file (urlresources.txt) is located under the cfg directory and contain all the url definitions (like translations of each url for exemple). below the format of each items:
[URL_ID|PAGE_ID]<Param1=a><Param2=b>..<ParamN=z> LANGUAGE_ID = URL_PATH LANGUAGE_ID = URL_PATH ...
the URL_ID is an arbitrary name you gave to the item. If omitted then URL_ID = PAGE_ID
the PAGE_ID is the path found in the cfgpages. for exemple
if in the cfgpages you have theses nodes :
<page name='/'> <page name='about'> <page name='careers'> </page> </page> </page>
that mean you have these 3 Page ID
then in the UrlResources.txt you would have these 3 items :
[/] FRA = / RUS = / ENU = / PTG = / ESP = / DEU = / [/about/] FRA = [/]a-propos/ RUS = [/]about/ ENU = [/]about/ PTG = [/]about/ ESP = [/]about/ DEU = [/]about/ [/about/careers/] FRA = [/about/]recrutement/ RUS = [/about/]careers/ ENU = [/about/]careers/ PTG = [/about/]careers ESP = [/about/]careers/ DEU = [/about/]careers/
Note: The FRA = [/about/]recrutement/ will be converted to FRA = /a-propos/recrutement/
Another more detailed exemple:
[ComForSale|/real-estate/commercial/for-sale/]<property_category=2><transaction_type=1> FRA = /immobilier/entreprise/vente/ RUS = /real-estate/commercial/for-sale/ ENU = /real-estate/commercial/for-sale/
This instruct the engine that variable property_category = 2 (commercial) and transaction_type = 1 (for sale). these variables can be used later by the engine (or the templates) via <#UrlInfos> to define the default property category and/or the default transaction type. Also here the URL_ID = ComForSale so it's mean that to retrieve the link from the <#url> tag you must use ComForSale for the Url_ID
The header line ([URL_ID|PAGE_ID]<Param1=a><Param2=b>..<ParamN=z>) can contain special params that will instruct the engine on with exact version (mobile, secure, etc) of the website the definition is for :
Tag | Definition |
---|---|
<#https> | 1 if the url definitions is ONLY for HTTPS protocol. 0 if ONLY for http protocol. If ommited URL definition is for both protocol. EX: [BaseHref]<url_https=0> |
<#mobile> | 1 if the url definitions is ONLY for mobile version. 0 if ONLY for desktop version. If ommited URL definition is for both version. EX: [BaseHref]<mobile=1> |
Each definition line (LANGUAGE_ID = URL_PATH) can contain some tags like for exemple :
Tag | Definition |
---|---|
<#property_id> | The Id of the property. Ex: ENU = [/minisite/v1/]<#url_property_id>/ |
<#propertyRequest_id> | Id of the property request. Ex: ENU = [/alerts/]<#url_propertyRequest_id>/ |
<#contact_id> | Id of the contact. Ex: ENU = [/blogs/members/]<#url_contact_id>/ |
This file can contain also HTTP redirect mapping instructions. Ex
=>301 [/forums/f2/] DEU = [/forums/] ESP = [/forums/] FRA = [/forums/] PTG = [/forums/] RUS = [/forums/] ENU = [/forums/]
This instruct to redirect (Http 301 redirect) [/forums/] to [/forums/f2/]
Also this file must contain some const declarations like