Hallo,
ich komm mir grade so blöd vor: (vielleicht bin ich ja auch blind beim suchen)..
wie kriege ich in Fluid einen Link dazu, einen Titel anzuzeigen?
<f:link.page pageUid="2" additionalParams="{foo: 'bar',title: 'Das ist mein Titel'}">page link</f:link.page>
macht zuminderst mal keine Fehlermeldung, aber halt auch keinen Titel.
muß ich das echt mit f:uri hinfrickeln?
hab TYPO3 4.6
viele Grüße,
Sabine
Hallo Sabine.
additionalParams dürfte sich lediglich auf die URI innerhalb des Links auswirken - zumindest ist es in TypoScript so.
Wenn ich auf die Schnelle den ViewHelper richtig verstanden habe, dann hat er die Universalattribute, die Du einfach direkt setzen kannst:
/**
* Registers all standard HTML universal attributes.
* Should be used inside registerArguments();
*
* @return void
* @api
*/
protected function registerUniversalTagAttributes() {
$this->registerTagAttribute('class', 'string', 'CSS class(es) for this element');
$this->registerTagAttribute('dir', 'string', 'Text direction for this HTML element. Allowed strings: "ltr" (left to right), "rtl" (right to left)');
$this->registerTagAttribute('id', 'string', 'Unique (in this file) identifier for this HTML element.');
$this->registerTagAttribute('lang', 'string', 'Language for this element. Use short names specified in RFC 1766');
$this->registerTagAttribute('style', 'string', 'Individual CSS styles for this element');
$this->registerTagAttribute('title', 'string', 'Tooltip text of element');
$this->registerTagAttribute('accesskey', 'string', 'Keyboard shortcut to access this element');
$this->registerTagAttribute('tabindex', 'integer', 'Specifies the tab order of this element');
$this->registerTagAttribute('onclick', 'string', 'JavaScript evaluated for the onclick event');
}
Folglich sollte es ganze infach gehen mit
<f:link.page pageUid="2" additionalParams="{foo: 'bar'}" title="Das ist mein Titel">page link</f:link.page>
Viele Grüße
Julian
Danke, genau so gehts (jei, sollte doch öfter mal in den Code gucken und nicht so viel ins Wiki..)
😃