[TYPO3-core] RFC #13510 : Feature: Add a Hook to add Sub Categories to the Constant Editor

Sebastian Gebhard sebastiangebhard at hoch2.de
Thu Feb 11 13:12:04 CET 2010


Am 11.02.10 11:23, schrieb Xavier Perseguers:
> May I ask you to propose change to the documentation such that it
> becomes clear for all users?

Good idea, this feature seems to be undocumented (or I still did not 
find the docu)

I think doc_core_tstemplates Chapter 
2.5(http://typo3.org/documentation/document-library/core-documentation/doc_core_tstemplates/0.0.1/view/2/5/) 
would be the right place. The chapter "Subcategories" should be updated to:



######## START OF MY DOCU PROPOSAL ##########



There are a number of subcategories to use. Subcategories are entered 
after the category-name separated by a slash "/". Example: "basic/color/a"

This will make the constant go into the "BASIC"-category, be listed 
under the "COLOR"-section and probably be one of the top-constants 
listed, because the "a" is used to sort the constants in a subcategory. 
If "a" was not entered, the default is "z" and thus it would be one of 
the last colors to select. As the third parameter here, you can choose 
whatever you like.

You can use one of the predefined subcategories or define your own. If 
you use a non-existing subcategory, your constant will just go into the 
subcategory "Other".

<h4 class="title">Predefined Subcategories</h4>

Standard subcategories (in the order they get listed in the Constant 
Editor):

<ul>
<li>enable: Used for options that enable or disable primary functions of 
a template</li>
<li>dims: Dimensions of all kinds; pixels, widths, heights of images, 
frames, cells and so on.</li>
<li>file: Files like background images, fonts and so on. Other options 
related to the file may also enter</li>
<li>typo: Typography and related constants</li>
<li>color: Color setup. Many colors will be found with related options 
in other categories though.</li>
<li>links: Links and Targets typically</li>
<li>language: Language specific options.</li>
</ul>

Subcategories based on the default content elements

<ul>
<li>cheader: Content "Header"</li>
<li>cheader_g: Content "Header", graphical</li>
<li>ctext: Content "Text"</li>
<li>cimage: Content "Image"</li>
<li>cbullets: Content "Bullet list"</li>
<li>ctable: Content "Table"</li>
<li>cuploads: Content "Filelinks"</li>
<li>cmultimedia: Content "Multimedia"</li>
<li>cmedia: Content "Media"</li>
<li>cmailform: Content "Form"</li>
<li>csearch: Content "Search"</li>
<li>clogin: Content "Login"</li>
<li>csplash: Content "Textbox"</li>
<li>cmenu: Content "Menu/Sitemap"</li>
<li>cshortcut: Content "Insert Records"</li>
<li>clist: Content "List of Records"</li>
<li>cscript: Content "Script"</li>
<li>chtml: Content "HTML"</li>
</ul>

These are all categories reserved for options that relate to content 
rendering for each type of tt_content element. See static_template 
"content (default)" and "styles.content (default)" for examples.

<h4 class="title">Custom Subcategories</h4>

To define your own Subcategory put a comment including the parameter 
"customsubcategory". Here's an example:

# customsubcategory=cache=LLL:EXT:myext/locallang.xml:cache

This line defines the new Subcategory "cache" which will be available 
for your Constants defined AFTER this line. Usage example:
#cat=Site conf/cache/a; type=boolean; label=Global no_cache
config.no_cache = 0

Will look in the Contant Editor like this:

[INSERT SCREENSHOT HERE]




######## END OF MY DOCU PROPOSAL ##########

And please correct following issue: There are the paragraphs "type=" and 
"label=" of type h4 inside subcategories. They should be h3 paragraphs 
AFTER subcategories
-------------- next part --------------
A non-text attachment was scrubbed...
Name: custom_subcategory.png
Type: image/png
Size: 10931 bytes
Desc: not available
URL: <http://lists.typo3.org/pipermail/typo3-team-core/attachments/20100211/9ca4a85a/attachment-0001.png>


More information about the TYPO3-team-core mailing list