Typo3 Fast Start


/ Published in: TYPO3
Save to your folder(s)

A Typo3 quickstart guide


Copy this code and paste it in your HTML
  1. # Introduction Package
  2. # Edit Template "ROOT" on page "TypoScript Templates"
  3. # Search for ROOT
  4. # Change filepaths
  5.  
  6. filepaths {
  7. # cat=filepaths; type=string; label=HTML Templates: Location of the (X)HTML templates relative to site
  8. templates = fileadmin/default/mesaric/
  9.  
  10. # cat=filepaths; type=string; label=CSS: Location of the Cascading Style Sheets relative to site
  11. css = fileadmin/default/mesaric/css/
  12.  
  13. # cat=filepaths; type=string; label=Images: Location of the images relative to site
  14. images = fileadmin/default/mesaric/images/
  15.  
  16. # cat=filepaths; type=string; label=Scripts: Location of the Javascript files relative to site
  17. scripts = fileadmin/default/mesaric/scripts/
  18.  
  19. # cat=filepaths; type=string; label=HTML Templates for extensions: Location of the (X)HTML templates for extensions
  20. extensiontemplates = fileadmin/default/mesaric/extensions/
  21. }
  22.  
  23. # Change template files and conditions
  24.  
  25. [globalVar = TSFE:id = 1]
  26. plugin.tx_automaketemplate_pi1 {
  27. # cat=plugin.automaketemplate; type:string; label= HTML template file: Name of the HTML page template file (without path, see contant for filepath.templates)
  28. templatefile = index.html
  29. }
  30. [global]
  31.  
  32. plugin.tx_automaketemplate_pi1 {
  33. # cat=plugin.automaketemplate; type:string; label= HTML template file: Name of the HTML page template file (without path, see contant for filepath.templates)
  34. templatefile = subpage.html
  35. }
  36.  
  37.  
  38. # Edit Template "plugin.automaketemplate" on page "extension_configuration"
  39. # divs freischalten
  40. # search for plugin.automaketemplate
  41.  
  42. # Configuring the Auto-Parser for main template:
  43.  
  44. plugin.tx_automaketemplate_pi1 {
  45.  
  46. # Read the template file
  47. content = FILE
  48. content.file = {$filepaths.templates}{$plugin.tx_automaketemplate_pi1.templatefile}
  49.  
  50. elements {
  51.  
  52. # blaaa blaaa other stuff
  53. # Custom
  54. DIV.id.content = 1
  55. }
  56.  
  57. # Prefix all relative paths in the HTML template with this value
  58. #relPathPrefix = {$filepaths.templates}
  59. }
  60.  
  61. # Insert Backend Layout
  62. # Root Template (das mit der Weldkugel)
  63. # Edit -> Resources -> Typoscript Configuration
  64. # add at last line
  65.  
  66. ##id storagepage of gridlayout
  67. TCEFORM.pages.backend_layout.PAGE_TSCONFIG_ID=78
  68. TCEFORM.pages.backend_layout_next_level.PAGE_TSCONFIG_ID=78
  69.  
  70. # Edit Template "page" on page "page_configuration"
  71. # and insert Template subparts
  72. # Search for page
  73.  
  74. subparts {
  75.  
  76. # blaaa blaaa other stuff
  77. # Custom
  78. content < styles.content.get
  79. content.select.where = colPos = 4
  80. }
  81.  
  82. # Create Navigation
  83. # Edit Template "menu.firstlevel" on page "menu_configuration"
  84.  
  85.  
  86. menu.firstlevel < menu
  87. menu.firstlevel {
  88. # Since this is the top-level menu, we start this menu at the root level of the website
  89. entryLevel = 0
  90. }
  91.  
  92. menu.firstlevel = HMENU
  93. menu.firstlevel{
  94. 1 = TMENU
  95. 1 {
  96. wrap = <ul>|</ul>
  97.  
  98. # Always unfold all sub-levels of the menu
  99. expAll = 1
  100.  
  101. # Remove the (old) default behaviour which adds onfocus="blurLink(this);" to all links
  102. noBlur = 1
  103.  
  104. # Define the normal state (not active, not selected) of menu items
  105. # Using NO=1 to activate normal state is not necessary, but useful when copying
  106. NO = 1
  107. NO {
  108. # Use the page title field the title property on the A-tag, but only if the navigation title is set
  109. ATagTitle {
  110. field = title
  111. fieldRequired = nav_title
  112. }
  113.  
  114. # Use the option-split feature to generate a different wrap for the last item on a level of the menu
  115. # The last item on each level gets class="last" added for CSS styling purposes.
  116. #
  117. # See the TSref documentation for details about option split and other features:
  118. # http://typo3.org/documentation/document-library/references/doc_core_tsref/current/
  119. wrapItemAndSub = <li>|</li> |*| <li>|</li> |*| <li class="last">|</li>
  120.  
  121. # HTML-encode special characters according to the PHP-function htmlSpecialChars
  122. stdWrap.htmlSpecialChars = 1
  123. }
  124.  
  125. # Copy properties of normal to active state, and then add a CSS class for styling
  126. ACT < .NO
  127. ACT {
  128. ATagParams = class="active"
  129. }
  130.  
  131. # Copy properties of normal to current state, and then add a CSS class for styling
  132. CUR < .NO
  133. CUR {
  134. ATagParams = class="selected"
  135. }
  136. }
  137.  
  138. 2 = TMENU
  139. 2 {
  140. wrap = <ul><li class="dropTop"></li>|<li class="dropBottom"></li></ul>
  141.  
  142. # Always unfold all sub-levels of the menu
  143. expAll = 1
  144.  
  145. # Remove the (old) default behaviour which adds onfocus="blurLink(this);" to all links
  146. noBlur = 1
  147.  
  148. # Define the normal state (not active, not selected) of menu items
  149. # Using NO=1 to activate normal state is not necessary, but useful when copying
  150. NO = 1
  151. NO {
  152. # Use the page title field the title property on the A-tag, but only if the navigation title is set
  153. ATagTitle {
  154. field = title
  155. fieldRequired = nav_title
  156. }
  157.  
  158. # Use the option-split feature to generate a different wrap for the last item on a level of the menu
  159. # The last item on each level gets class="last" added for CSS styling purposes.
  160. #
  161. # See the TSref documentation for details about option split and other features:
  162. # http://typo3.org/documentation/document-library/references/doc_core_tsref/current/
  163. wrapItemAndSub = <li>|</li> |*| <li>|</li> |*| <li class="last">|</li>
  164.  
  165. # HTML-encode special characters according to the PHP-function htmlSpecialChars
  166. stdWrap.htmlSpecialChars = 1
  167. }
  168.  
  169. # Copy properties of normal to active state, and then add a CSS class for styling
  170. ACT < .NO
  171. ACT {
  172. ATagParams = class="active"
  173. }
  174.  
  175. # Copy properties of normal to current state, and then add a CSS class for styling
  176. CUR < .NO
  177. CUR {
  178. ATagParams = class="selected"
  179. }
  180. }
  181. }
  182. }
  183.  
  184.  
  185.  
  186. #Edit Template "menu.secondlevel" on page "menu_configuration"
  187.  
  188. # This menu is slightly more complicated than the others because we copy our default menu again, but then we'll start overriding some settings from the default menu.
  189. # To get a full overview of the configuration of this menu you should look at both our default 'menu' and the 'menu.secondlevel' as shown below.
  190. # You can use the TypoScript Object Browser to view the end result of this.
  191. # (go to the Template module and select 'Typoscript Object Browser' in the selectbox in the right frame.)
  192.  
  193. menu.secondlevel < menu
  194. menu.secondlevel {
  195. entryLevel = 1
  196.  
  197. 1 {
  198. NO {
  199. wrapItemAndSub = <li>|</li>
  200. }
  201.  
  202. # First clear the ATagParams setting of the ACT state because we are working with a copy of the object 'menu'
  203. # After that we add our modified configuration for menu.secondlevel
  204. ACT {
  205. ATagParams >
  206. wrapItemAndSub = <li class="active">|</li>
  207. }
  208.  
  209. CUR {
  210. ATagParams >
  211. wrapItemAndSub = <li class="selected">|</li>
  212. }
  213.  
  214. }
  215.  
  216. # Copy the configuration of the first level of this menu to level 2 and 3
  217. 2 < .1
  218. 3 < .1
  219. }
  220.  
  221. # Include CSS
  222. # search for page.includeCSS
  223.  
  224. page.includeCSS {
  225. 5 = {$filepaths.css}example.css
  226. 5 {
  227. media = all
  228. }
  229. 6 = {$filepaths.css}grid.css
  230. 6 {
  231. media = all
  232. }
  233. 10 = {$filepaths.css}style.css
  234. 10 {
  235. media = all
  236. }
  237. 20 = {$filepaths.css}print.css
  238. 20 {
  239. media = print
  240. }
  241. }
  242.  
  243. # register editable Areas
  244. # goto Rootpage -> eidt -> resources -> Typoscript Configuration
  245.  
  246. mod.SHARED.colPos_list = 1,0,2,3 # enter here your backendlayout Cols
  247.  
  248. # Add Footer menu
  249. # create new Folder
  250. # click on Functions -> and create the pages
  251. # goto menu_configuration -> menu.top
  252.  
  253. # Copy basic menu object from TS template 'menu' so we don't have to repeat all that
  254. menu.top < menu
  255. menu.top {
  256. # Also show pages which have not-in-menu flag set in page properties
  257. includeNotInMenu = 1
  258.  
  259. # Create a menu out of the pages specifically listed under special.value
  260. special = directory
  261. special.value = 75 # !!!!change to folder Id
  262. }

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.