[TYPO3-english] Typo3 advice needed

Erdal Gök comm at webcan.de
Wed Sep 19 19:45:38 CEST 2012


Hi Katja,

this is great. Please put it on some blog post or wiki or whatever, :-).

KR

Erdal


Katja Lampela wrote:
> Hi Shahil,
>
> I don't use templavoila but here is the traditional approach.
> (Please correct someone if I'm wrong or outdated!)
>
> The standard model of templating has 4 main editable columns (0
> "Normal",1 "Left", 2 "Right", 3 "Border"). This is often enough and you
> can layout these columns in which ever way you want in your html
> template. (You can also add more main columns, but this requires extra
> coding, see below the "FOR EXTRA COLUMNS TO WORK". You can also devide
> the main column into editable sub columns, but that you can learn later
> maybe, anything is possible anyway ;)
>
> The templating is in 3 parts:
>
> A. HTML template (This could be done with ts also, but I find it easiest
> to make the design with html+css)
> B. typoscript template
> C. backend template (optional, this tells how the editor sees the
> columns with WEB/Page module. I dont' get into this in this post.)
>
>
> A. HTML TEMPLATE
> the main markers (subpart)
> <html><body>
> <!-- ###DOCUMENT_BODY### START-->
> blahblah
> <!-- ###DOCUMENT_BODY### END-->
> </body></html>
>
> and within blahblah you have the html and divs you want and markers like
> ###colNormal###, ###colLeft### and so on. Inside the marker goes the
> content editor inserts with TYPO3.
> The extra columns could be marked as ###col4###, ###col5### and so on.
>
>
> B. TS TEMPLATE
> For anything to work you need to install into your main ts
> template/Includes/Include Static the css_styled_content.
>
> So my setup would be following.
>
> #if you have extra columns add/insert this in the beginning
> temp.additionalcolumn4 = CONTENT
> temp.additionalcolumn4 {
>      table = tt_content
>      select {
>          pidInList = this
>          orderBy = sorting
>          where = colPos = 4
>          languageField = sys_language_uid
>      }
> }
>
> #the main part is:
>
> page.stylesheet = fileadmin/template/css/yourtylesheet.css
> page.bodyTag = <body class="yourbodyclass">
> page.10 = TEMPLATE
> page.10.marks.PAGE_UID = TEXT
> page.10.marks.PAGE_UID.field = uid
> //page.10.template =< plugin.tx_automaketemplate_pi1 //this ext is a
> good thing to examin
> page.10.template.file = your file to your html template
>
> page.10  {
>     workOnSubpart = DOCUMENT_BODY
>     marks.colNormal < styles.content.get
>     marks.colLeft < styles.content.getLeft
>     marks.colRight < styles.content.getRight
>     marks.colBorder < styles.content.getBorder
>     marks.col4 < temp.additionalcolumn4
> }
>
>
> FOR EXTRA COLUMNS TO WORK (now please correct me someone if this is not
> needed anymore)
>
> You also have to modify the typo3conf/extTables.php
>
> Here would be the columns I want to use, the snippet is originally
> copied from some setup. I don't know about the | pipes, how many and
> what marks what. Hopefully some kind soul will tell. Anyway I include
> this in the end of the typo3conf/extTables.php:
>
> t3lib_extMgm::addPageTSConfig('mod.SHARED.colPos_list = 0,1,2,3,4,5
> ');
> $TCA["tt_content"]["columns"]["colPos"]["config"]["items"] = array (
>                      "0" => array ("NORMAL||here probably is the extra
> lang name of the column||||||||","0"),
>                      "1" => array ("LEFT||blah1 your column
> name||||||||","1"),
>                      "2" => array ("RIGHT||blah2||||||||","2"),
>                      "3" => array ("BORDER||blah3 ||||||||","3"),
>                      "4" => array ("Column 4||blah4||||||||","4"),
> );
>
> That's it - hope it helps you.
>
> Kind regards,
> Katja
>
>
> 19.9.2012 15:11, Shahil Sham kirjoitti:
>> Hello,
>>
>> I am doing an upcoming project in Typo3 and getting into the basics have
>> been overwhelming.
>> Can anyone give me a sample template of how to add content to a specific
>> div in a my html template using typoscript?
>> I can print the content and the layouts seperately, but have no idea
>> how to
>> print it within the template defined below:
>>
>> *# Template content object:*
>> *temp.mainTemplate = TEMPLATE*
>> *temp.mainTemplate {*
>> *  template = FILE*
>> *  template.file = fileadmin/template/customTemplate_1.html*
>> *  workOnSubpart = DOCUMENT_BODY*
>> *  subparts.INSIDE_HEADER = HTML*
>> *  subparts.INSIDE_HEADER.value = {field:title}*
>> *  subparts.INSIDE_HEADER.value.insertData = 1*
>> *  subparts.INSIDE_CONTENT = CONTENT*
>> *  subparts.INSIDE_CONTENT.value = < styles.content.get*
>> *  subparts.INSIDE_CONTENT.value.insertData = 1*
>> *  subparts.INSIDE_FOOTER = HTML*
>> *  subparts.INSIDE_FOOTER.value = &copy 2012. All rights reserved*
>> *}*
>>
>> *# Default PAGE object:*
>> *page = PAGE*
>> *page.typeNum = 0*
>>
>> *page.9 < temp**.mainTemplate*
>>
>> I tried the highlighted style, but didnt get it. I would like a sample
>> HTML
>> template and a Typoscript template to refer if possible. Thanks
>> Also, What is a decent method for creating a custom Template. The many
>> outdated tutorials, and with many methods like Viola and Template Parser,
>> which is better to follow?
>> PS, I've been doing PHP development, HTML, CSS, Joomla for few years, and
>> this is my first attempt at Typo3.
>>
>> --
>> Shahil Sham
>>
>> ss at phases.dk
>> skype: shahilsham
>>



More information about the TYPO3-english mailing list