Feature #16088

Adding propertie "class" for typolink

Added by Elmar Hinz over 13 years ago. Updated about 2 years ago.

Status:
Closed
Priority:
Should have
Assignee:
Category:
Communication
Target version:
-
Start date:
2007-08-02
Due date:
% Done:

0%

Estimated time:
PHP Version:
4.3
Tags:
Complexity:
Sprint Focus:

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)


Related issues

Related to TYPO3 Core - Bug #16741: typoLink doesn't use "type" correctly with simulateStaticDocumentsRejected2006-11-27

Actions
#1

Updated by Elmar Hinz over 13 years ago

This is related to bug 0004564

#2

Updated by Elmar Hinz over 13 years ago

If an class attribute property is provided, an id attribute could simply be added in the same way.

#3

Updated by Steffen Kamper over 13 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

#4

Updated by Elmar Hinz over 13 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.

#5

Updated by Steffen Kamper over 13 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" ...

#6

Updated by Elmar Hinz over 13 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.

#7

Updated by Benni Mack over 12 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.

#8

Updated by Benni Mack about 2 years ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF