cotonti.com : Page extra field value in page.tpl https://www.cotonti.com Laatste forum onderwerpen Cotonti en Fri, 16 Jan 2026 09:26:38 -0000 Kort Assuming you have an extrafield "producttype" with a value "jckt". To localize it you go for:

$L['producttype_jckt'] = 'Jacket';

in the theme lang file. So in the page.tpl you can use the tag:

{PAGE_PRODUCTTYPE}

to get the localized "Jacket" string or the variable

{PHP.pag.page_producttype}

to get the original "jckt" value.

]]>
Ma, 03 Dec 2012 05:22:32 -0000
Macik  

Where you need to use (get) extrafield value? In PHP code or in TPL file? 

If you speak about using it in TPL file it depends what TPL file it is. 

For page.tpl this should be:

{PAGE_DATE2_TITLE} {PAGE_DATE2}

Where `DATE2` is name of ExtraField. {PAGE_DATE2_TITLE}-prints title for it and  {PAGE_DATE2} -prints Value of this extrafield.

Добавлено 30 минуты спустя:

I realized what you mean… 

Once you set up $L['extra_#'] for fields variants you get it in page instear of raw value.

So only one ability to get raw data of extrafields is to unset your $L['extra_#'] before page «renders».

Or you can assign this vars ($L['extra_#']) only for pageedit and pageadd pages.

]]>
Zo, 02 Dec 2012 21:09:45 -0000
Trustmaster I haven't quite understood what you mean but it seems like you need to assign a value rather than a key:

$L['<extrafieldname>_<value>'] = $L['<extrafieldname>_<value>_<alias>'];

 

]]>
Zo, 02 Dec 2012 16:06:32 -0000
Uch Hello!

If i use $L['<extrafieldname>_<value>'] = '<extrafieldname>_<value>_<alias>' in my language files, i get {PAGE_<EXTRAFIELDNAME>} =  <extrafieldname>_<value>_<alias> in my page instead of its value.

How can i get page extra field value instead of its alias?

]]>
Zo, 02 Dec 2012 15:33:52 -0000