Russian TYPO3 community

Russian TYPO3 community (http://forum.typo3.ru/index.php)
-   TypoScript практикум (http://forum.typo3.ru/forumdisplay.php?f=27)
-   -   TSconfig страницы (http://forum.typo3.ru/showthread.php?t=10393)

Ивано 06.11.2012 15:12

TSconfig страницы
 
Возможно ли в данном поле объявить свои т.сказать константы (параметры) К ОПРЕДЕЛЕННОЙ СТРАНИЦЕ к примеру,
bgfon = test.gif
padding: 100px;
menuimage = gg.gif

и после их использовать в TS-шаблона сайта?

Ивано 06.11.2012 15:14

Своего рода объявить константы для данной страницы?

Ивано 06.11.2012 15:32

Вот так прописал в конфигурации страницы

TSFE.constants.webpageConfig.MeineVar = 12345
TSFE.constants.sectnav.entryLevel = 3
TSFE.constants.websiteConfig.siteColor = #119911

И пытаюсь вызвать хоть какую-то из этих констант вот так, но не работает...

#subparts.content < styles.content.get
subparts.content = TEXT
subparts.content.value = {$websiteConfig.siteColor}
subparts.content.insertData = 1

Ивано 06.11.2012 16:18

Почему-то у меня к примеру
TSFE.constants.websiteConfig.id = 123 создается только в корневой странице (где расположен основной шаблон сайта), - данный параметр можно даже просмотреть в анализе шаблона...

А вот если его установить в любой странице уровнем ниже (не корневой) - то он не выводится в константы, как с ним правильно работать?

shuman 09.11.2012 06:53

"Notice: In the frontend the setting of default constants will only
apply to a branch of the tree if a template record is found on that
page (or if a template record is set for "next level"). In other
words: If you want the Page TSconfig constant defaults to affect only
a certain branch of the page tree, make sure to create a template
record (a blank one will do) on the page that carries the Page
TSconfig information."

http://typo3.3.n7.nabble.com/TSFE-co...5-td93694.html взято отсюда


Часовой пояс GMT +4, время: 08:35.

Работает на vBulletin® версия 3.8.1.
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Перевод: zCarot