Russian TYPO3 community

Russian TYPO3 community (http://forum.typo3.ru/index.php)
-   Общие вопросы (http://forum.typo3.ru/forumdisplay.php?f=12)
-   -   По поводу TypoScript (http://forum.typo3.ru/showthread.php?t=552)

Aleksandrov 08.03.2005 01:40

По поводу TypoScript
 
Кто-нибудь, объясните толком, пожалуйста, доступными словами, для чего нужен TypoScript и насколько нужно быть программером для того, чтоб его освоить? Я только начинаю изучать TYPO3. Всем заранее спасибо!

Gleb 08.03.2005 09:16

TS needs for configuration and settings.
There are \"TS by example\" and \"TS ref\" docs. Personally I do think it is better to start with TS ref and then take a look in examples. TS ref has examples with explanation as well.
The other way to go is to write an extention. It will clarify a lot (for me at least).
Here is an example how TS it is mainly used:
In your html template you have to put marker or subpart. This marker or subpart then will be replaced with some content. And the content is defined by TS.
1. Say this is a chank of your html with marker:
<hr />
<div>###MARKER_HERE###</div>
<hr />
2. Here is a chank of your TS temploate:
page.20.mark.MARKER_HERE < TEXT
page.20.marks.MARKER_HERE.value = Hey here

The result is that the marker is replaced with \"Hey here\" string. So instead of putting text you can stream output of your script and replace the marker.

If you just started with TYPO I can say from my experience do not experiment on big project. First spend some time and create simple site. It will allow you to get the point. Then thins go smoother with real project.

Have a luck :)









Valery Romanchev 08.03.2005 18:18

Помоему самая главная вещь (которую лично я не сразу понял :-)) - это то, что TS является заменой конфигурационных файлов.
Например, если посмотрите конфиг файл phpMyAdmin, то увидите задание PHP-массивов, которые собственнои и определяют конфигурацию.
Так вот, TS - это те же самые многомерные PHP-массивы, только с правилами рендернинга
(котрые сделаюы с помощью всяких там функций типа stdWrap)


Gleb 09.03.2005 10:34

I am sorry for typo in my last post. It should be
page.20.mark.MARKER_HERE = TEXT
instead of
page.20.mark.MARKER_HERE < TEXT
-----------------------------------------
Yes it is completely true what VR said. TS is just another way to define PHP array. But it is not obvious. Implicitly I comprehended it but explicitly I got it later. In other words with TS you create datastructure then TS parser translate it into PHP array. Then TYPO kernal parses it according to its own rouls. For me was hard to understand why this one more layer of complecity then when I start getting used to it I realized that it is pretty cool and neat.


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

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