[Typo3] headers removed

typo3 mailing list typo3.ml at gmail.com
Mon Mar 28 00:56:18 CEST 2005


Hello!

I've been studying typo3 for the last weeks; I've some problems that I
haven't figured out how to solve them, that's why I'd like to post
some questions:

I've been following 'Modern Template Building, Part 1' with some small
modifications (I'm trying to define an horizontal menu instead of the
vertical one), I have included a stylesheet in the template, but this
stylesheet is never used. I've also found that everything included
between <head> is removed. Can you show me what's wrong?
I'm including relevant information.

Any help would be appreciated, thank you in advance for your reply.
Regards,

Miguel



#----------- this is the source file of the generated document

    <table border="0" cellpadding="0" cellspacing="0">
        <tr><td id="header_1"><!--###header_1### begin --><img
src="fileadmin/template/images/logoFree-mini.jpg" width="600"
height="100" border0><!--###header_1### end --></td></tr>

        <tr><td id="menu_1"><span class="menu1-level1-no"><a
href="index.php?id=6" onfocus="blurLink(this);">menu 0</a></span><span
class="menu1-level1-no"><a href="index.php?id=5"
onfocus="blurLink(this);">menu 1</a></span><span
class="menu1-level1-no"><a href="index.php?id=4"
onfocus="blurLink(this);">menu 2</a></span><span
class="menu1-level1-no"><a href="index.php?id=3"
onfocus="blurLink(this);">menu 3</a></span><span
class="menu1-level1-no"><a href="index.php?id=2"
onfocus="blurLink(this);">menu 4</a></span></td></tr>

        <tr><td id="content"></td></tr>
    </table>


#----------- template file

<html>
<head>
    <title>template title</title>
    <link href="res/stylesheet.css" rel="stylesheet" type="text/css">
</head>

<body>
    <table border="0" cellpadding="0" cellspacing="0">
        <tr><td id="header_1"><img src="images/logoFree-mini.jpg"
width="600" height="100" border"0"></td></tr>

        <tr><td id="menu_1">" "
        <span class="menu1-level1-no"><a href="#">Menu item 1</a></span>
        <span class="menu1-level1-act"><a href="#">Menu item 2</a></span>
        " "
        </td></tr>

        <tr><td id="content">
        <h1>Test title</h1>
        <p class="bodytext">First paragraph
        <p class="bodytext">Second paragraph
        </td></tr>
    </table>
</body>

</html>

#---------------- Setup field

# Configuring the Auto-Parser:
plugin.tx_automaketemplate_pi1 {
  # Read the template file:
  content = FILE
  content.file = fileadmin/template/corporativo.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

    TD.all = 1
  }

  # Prefix all relative paths with this value:
  relPathPrefix = fileadmin/template/
}

# Menu 1 cObject
temp.menu_1 = HMENU
  # First level menu-object, textual
temp.menu_1.1 = TMENU
temp.menu_1.1 {
    # Normal state properties
  NO.allWrap = <span class="menu1-level1-no"> | </span>
    # Enable active state and set properties:
  ACT = 1
  ACT.allWrap = <span class="menu1-level1-act"> | </span>
}
  # Second level menu-object, textual
temp.menu_1.2 = TMENU
temp.menu_1.2 {
    # Normal state properties
  NO.allWrap = <span class="menu1-level2-no"> | </span>
    # Enable active state and set properties:
  ACT = 1
  ACT.allWrap = <span class="menu1-level2-act"> | </span>
}

# 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 ###menu_1### subpart with dynamic menu:
  subparts.menu_1 < temp.menu_1

# Substitute the ###content### subpart with some example content:
  subparts.content < styles.content.get
}

# Main TEMPLATE cObject for the HEAD
temp.headTemplate = TEMPLATE
temp.headTemplate {
    # Feeding the content from the Auto-parser to the TEMPLATE cObject:
  template =< plugin.tx_automaketemplate_pi1
    # Select only the content between the <head>-tags
  workOnSubpart = DOCUMENT_HEADER
}

page = PAGE
page.typeNum = 0
page.config.disableAllHeaderCode=1

# Copying the content from TEMPLATE for <body>-section:
page.10 < temp.mainTemplate

# Copying the content from TEMPLATE for <head>-section:
page.headerData.10  < temp.headTemplate



More information about the TYPO3-english mailing list