Forums / Cotonti / Support / Page extra field value in page.tpl

Macik
#36391 2012-12-02 21:09

 

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.

https://github.com/macik
правильный хостинг — https://goo.gl/fjCa1F
This post was edited by Macik (2012-12-02 21:39, 11 years ago)