User Tools

Site Tools


typo3_sitepackage_contentelements

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
typo3_sitepackage_contentelements [2018/09/27 11:01] – [Add a template path] admintypo3_sitepackage_contentelements [2018/09/28 07:53] (current) admin
Line 13: Line 13:
 This will show your new element in the content element wizard This will show your new element in the content element wizard
  
-<code typoscript Configuration/TypoScript/TSconfig/Page/TSconfig.txt> +<code typoscript Configuration/PageTS/TSconfig.txt>
-#######################################+
 # Custom Contentelements based on fluid # Custom Contentelements based on fluid
 mod.wizards.newContentElement.wizardItems.common { mod.wizards.newContentElement.wizardItems.common {
Line 91: Line 90:
 ==== Configure template ==== ==== Configure template ====
  
-<code> +<code typoscript
-### Add template path for your extension+# Add template path for your extension
 lib.contentElement { lib.contentElement {
   templateRootPaths {   templateRootPaths {
Line 99: Line 98:
 } }
  
-### +Load defaults and define Template
 tt_content { tt_content {
-  myextkey_newcontentelement =< lib.contentElement +  myextkey_elementname =< lib.contentElement 
-  myextkey_newcontentelement +  myextkey_elementname 
-    templateName = NewContentElement+    templateName = NameOfYourTemplate
   }   }
 } }
 </code> </code>
 +
 +Depending on which contentelement this is based on you can simply load.
 +
 +For example this element should be based on ''image'':
 +
 +<code typoscript>
 +tt_content {
 +  myextkey_elementname =< tt_content.image
 +  myextkey_elementname {
 +    templateName = NameOfYourTemplate
 +  }
 +}
 +</code>
 +
 +You'll find all available CEs in ''typo3/sysext/fluid_styled_content/Configuration/TypoScript/ContentElement/''.
 +
 +==== Config field for certain cType ====
 +
 +<code php>
 +$GLOBALS['TCA']['tt_content']['types']['CTYPE_NAME']['columnsOverrides']['image']['config']['maxitems'] = 3;
 +$GLOBALS['TCA']['tt_content']['types']['CTYPE_NAME']['columnsOverrides']['image']['config']['minitems'] = 3;
 +</code>
 +
typo3_sitepackage_contentelements.1538046106.txt.gz · Last modified: 2018/09/27 11:01 by admin