[TYPO3] TYPO3: Newbie template question
Jasper
jasper22 at xaker.ru
Sun Jan 1 22:39:19 CET 2006
Just to fix a little mistake in your text
in a line: page.10 < plugin.tx_automaketemplate_pi1
you must (!) put: page.10 < temp.mainTemplate
Just because you modyfing the template in 'temp' section/value -> thanks
to tutorial
(it took me 2 hours to find :( )
I'm still don't know what the problem was with my first configuration
.... :( I have to remove everything and re-create the 'root' page again
and then magicly it start to work and recognize my index.html.....
strange....
(this took me 4 hours to find out)
Søren Vedel wrote:
> Hi Jasper,
>
> Did you include the css_styled_content extension in your template
> (include static)?
>
> Well, do it now and do what you see below!
>
>
> Try this. There are some small modifications to your setup...
>
>
> plugin.tx_automaketemplate_pi1 {
> # Read the template file:
> content = FILE
> content.file = fileadmin/template/main/index.html
>
> # Here we define which elements in the HTML that
> # should be wrapped in subpart-comments:
> elements {
> BODY.all = 1
> BODY.all.subpartMarker = DOCUMENT_BODY
>
> HEAD.all = 1
> HEAD.all.subpartMarker = DOCUMENT_HEADER
> HEAD.rmTagSections = title
> }
> #elements close
>
> # Prefix all relative paths with this value:
> relPathPrefix = fileadmin/template/main/
> }
> #autoparser close
>
>
> # In the next part the autoparser does the job for you!
> # It substitutes the subparts - ###words_between_hashes### (just an
> example!)
>
> # Main TEMPLATE cObject for the BODY
> temp.mainTemplate = TEMPLATE
> temp.mainTemplate {
> # Feeding the content from the Auto-parser to the TEMPLATE cObject:
> template =< plugin.tx_automaketemplate_pi1
> # Select only the content between the <body>-tags
> workOnSubpart = DOCUMENT_BODY
>
> # Substitute the ###header### subpart with content:
> subparts.header < temp.header
>
> # Substitute the ###menu_1### subpart with content:
> subparts.menu_1 < temp.menu_1
>
> # Substitute the ###content### subpart with content:
> subparts.content < styles.content.get
>
> # Substitute the ###right_content### subpart with content:
> subparts.right_content < styles.content.getRight
> }
>
>
> # Default PAGE object:
> page = PAGE
> page.typeNum = 0
>
> # Dont disable all headercode - what about your styles?
> # page.config.disableAllHeaderCode=1
>
> page.10 < plugin.tx_automaketemplate_pi1
>
> # End of template
>
>
> In your html-template -
> http://localhost/fileadmin/template/main/index.html - you have to insert
> the subpartmarkers where you want the content to show up.
>
>
> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
>
> <html>
> <head>
> <title>Untitled</title>
> <style>
> td{font-family:Arial;font-size:10px;color:#747474}
> .cap{font-weight:bold;font-size:11px;padding-left:30px;padding-right:30px;padding-top:7px;}
>
>
> .left{font-weight:bold;font-size:10px;padding-left:30px;padding-right:30px;padding-top:5px;}
>
>
> .footer{font-weight:bold;color:#FF2A00;text-decoration:none;}
> </style>
> </head>
>
> <body>
> <table cellpadding="0" cellspacing="0" border="0" height="100%">
> <tr>
> <td rowspan="10" width="50%" height="100%"
> background="images/bg1222.jpg" style="background-position:right top;
> background-repeat:repeat-y">
> </td>
> <td rowspan="10" width="1" bgcolor="#000000">
> </td>
> <td colspan="4">
> <table cellpadding="0" cellspacing="0" border="0">
> <tr>
> <td rowspan="3"><img src="images/lefttop.jpg">
> </td>
> <td width="686" height="32"
> background="images/top.jpg">
> </td>
> <td rowspan="3"><img src="images/righttop.jpg">
>
>
> <!-- here it comes -->
> <tr>
> <td>###menu_1###</td>
> <td width="686" height="32">###content###</td>
> <td>###right_content###</td>
> </tr>
>
>
> I hope you get the point now.
>
> Good luck
> /Søren
More information about the TYPO3-english
mailing list