Posted By

nick108 on 03/06/10


Tagged

templating


Versions (?)

Auto-Parser Configuration


 / Published in: TYPO3
 

  1. # Configuring the Auto-Parser for main template:
  2. plugin.tx_automaketemplate_pi1 {
  3. # Read the template file:
  4. content = FILE
  5.  
  6. content.file = fileadmin/templates/main-template.html
  7.  
  8. # Here we define which elements in the HTML that
  9. # should be wrapped in subpart-comments:
  10. elements {
  11. BODY.all = 1
  12. BODY.all.subpartMarker = DOCUMENT_BODY
  13.  
  14. HEAD.all = 1
  15. HEAD.all.subpartMarker = DOCUMENT_HEADER
  16. HEAD.rmTagSections = title
  17.  
  18. DIV.all = 1
  19. SPAN.all = 1
  20. }
  21.  
  22. # Prefix all relative paths with this value:
  23. relPathPrefix = fileadmin/templates/
  24. }
  25.  
  26. # Main TEMPLATE cObject for the BODY
  27. temp.mainTemplate = TEMPLATE
  28. temp.mainTemplate {
  29. # Feeding the content from the Auto-parser to the TEMPLATE cObject:
  30. template =< plugin.tx_automaketemplate_pi1
  31. # Select only the content between the <body>-tags
  32. workOnSubpart = DOCUMENT_BODY
  33.  
  34. # Substitute the ###theme### subpart with a theme image:
  35. subparts.theme < temp.theme
  36.  
  37. # Substitute the ###topmenu### subpart with dynamic menu:
  38. subparts.topmenu < temp.menu
  39.  
  40. # Substitute the ###content### subpart
  41. subparts.content < styles.content.get
  42.  
  43. # Substitute the ###language### subpart
  44. subparts.language < temp.language
  45.  
  46. # Substitute the ###search### subpart with the search form:
  47. subparts.search < temp.search
  48.  
  49. # Substitute the ###news### subpart with the news teasers:
  50. subparts.news < styles.content.getRight
  51. }
  52.  
  53. # Main TEMPLATE cObject for the HEAD
  54. temp.headTemplate = TEMPLATE
  55. temp.headTemplate {
  56. # Feeding the content from the Auto-parser to the TEMPLATE cObject:
  57. template =< plugin.tx_automaketemplate_pi1
  58. # Select only the content between the <head>-tags
  59.  
  60. workOnSubpart = DOCUMENT_HEADER
  61.  
  62. }
  63.  
  64. # Default PAGE object:
  65. page = PAGE
  66. page.typeNum = 0
  67.  
  68. # Copying the content from TEMPLATE for <body>-section:
  69. page.10 < temp.mainTemplate
  70.  
  71. # Copying the content from TEMPLATE for <head>-section:
  72. page.headerData.10 < temp.headTemplate

Report this snippet  

You need to login to post a comment.