Issue Bug Closed

#17415Don't work automaketemplate

Andrey 06/24/07, 20:17 updated 07/25/08, 22:50

Description

When I maked new html-based template and insert in setup code from documentation “Modern template building” the code dosen’t working: don’t insert content from styles.content in page. The page code in attache. The code of template setup fild above.

  1. Configuring the Auto-Parser for main template:
    plugin.tx_automaketemplate_pi1 { # Read the template file:
    content = FILE
    content.file = fileadmin/template/main/index.htm
  1. Here we define which elements in the HTML that
  2. 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
}

  1. Prefix all relative paths with this value:
    relPathPrefix = fileadmin/template/main/
    }
  1. 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<br> workOnSubpart = DOCUMENT_BODY</body>
  1. 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

}

  1. 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<br> workOnSubpart = DOCUMENT_HEADER<br>}</head>
  1. Default PAGE object:
    page = PAGE
    page.typeNum = 0
  1. Copying the content from TEMPLATE for <body>-section:<br>page.10 &lt; temp.mainTemplate</body>
  1. Copying the content from TEMPLATE for <head>-section:<br>page.headerData.10 &lt; temp.headTemplate</head>

(issue imported from #M5845)

Reviews 0

No change resolves or names this issue in its commit message, and no comment links one.