Feature #16088
closedAdding propertie "class" for typolink
0%
Description
The typolink property "parameter" takes several informations:
http://typo3.org/documentation/document-library/references/doc_core_tsref/4.0.0/view/5/8/
Example:
51,5 _blank blueLink
<a href=”index.php?id=51&type=5” target=”_blank” class=”blueLink”>
To improve the API a class property should be available alternatively:
typolink.class = blueLink
(issue imported from #M6062)
Updated by Elmar Hinz over 17 years ago
If an class attribute property is provided, an id attribute could simply be added in the same way.
Updated by Steffen Kamper over 17 years ago
atm the class can be given with 2 ways
1) parameter divided by space (your example)
2) $GLOBALS['TSFE']->ATagParams
Adding a 3rd possibility makes is really complex so i normally use the second way from extension/TS
Updated by Elmar Hinz over 17 years ago
@Steffen: Right. It's a "bordercase" and less important. Not to change it, isn't the worst case.
Both options are not really nice:
1) parameter divided by space (your example)
2) $GLOBALS['TSFE']->ATagParams
Having three options on the other hand is also confusing:
3) typlink.class = blueLink
IMHO the most stringent would be 4.)
4.)
typolink {
[...]
attributes {
class = blueLink
id = bl7
xyz = 123
[...]
}
}
The attributes would have lowest precedence comparing the traditional settings.
Updated by Steffen Kamper over 17 years ago
I agree, but ATagParams does exactly the same, you can add params as you like, it's only a different kind of writing.
typolink.ATagParams = class="blue" id="fghe" set="first" ...
Updated by Elmar Hinz over 17 years ago
You are right, there isn't a big difference in typing. I would go for a "TS array" because it is a standard format. It can be extended by standard features. You could implement for example, that every attribute is of the type getText, wich opens many new options.
Updated by Benni Mack over 16 years ago
I don't see a big problem in keeping it like it is right now and not adding more options for that. Steffen is right.