Feature #25133

TMENU has no typolink function

Added by Simon Schaufelberger almost 9 years ago. Updated almost 4 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
-
Target version:
-
Start date:
2011-02-22
Due date:
% Done:

0%

PHP Version:
Tags:
Complexity:
Sprint Focus:

Description

i use this as a base:

temp.tmenuUl = HMENU
temp.tmenuUl {
    entryLevel = 0
    1 = TMENU
    1 {
        noBlur = 1
        wrap = <ul>|</ul>
        NO {
            ATagBeforeWrap = 1
            wrapItemAndSub = <li>|</li>
            stdWrap.htmlSpecialChars = 1
        }
    }
}

now what i am tying to do is to attach a hash value after the link href and tried the following (important, if you want to read the hash with javascript or ajax):
temp.tmenuUl {
    1 {
        NO {
            stdWrap.typolink.additionalParams = #test
        }
    }
}

which is sadly not working.

i know there are workarounds but they are kind of difficult and ugly.

can this be implemented and still be backwards compatible?

(issue imported from #M17709)

History

#1 Updated by Simon Schaufelberger almost 9 years ago

oh, the bugtracker does not encode html...

the line above was (encoded):

wrapItemAndSub = [li]|[/li]

#2 Updated by Steffen Kamper almost 9 years ago

Please look to tsRef first!
additionalParams is available.

#3 Updated by Simon Schaufelberger almost 9 years ago

i did that but the thing does not what i want.

i think i found a bug here:

typo3\sysext\cms\tslib\class.tslib_menu.php line 1576 in trunk

/**
 * Creates the <A> tag parts for the current item (in $this->I, [A1] and [A2]) based on other information in this array (like $this->I['linkHREF'])
 *
 * @return    void
 * @access private
 */
function setATagParts()    {
    $this->I['A1'] = '<a '.t3lib_div::implodeAttributes($this->I['linkHREF'],1).' '.$this->I['val']['ATagParams'].$this->I['accessKey']['code'].'>';
    $this->I['A2'] = '</a>';
}

here no additionalParams are attached to the link even if using this ts:
temp.tmenuUl {
    1 {
        additionalParams = #test
    }
}

next try while digging deeeeeper into the core:
I found out that this works:
temp.tmenuUl {
    1 {
        addParams = &abc=3
        # additionalParams = &a=b     # does NOT work!
    }
}

but additionalParams don't get respected in any way.

This also does NOT work:

temp.tmenuUl {
    1 {
          addParams = <HASH>3
    }
}

but this is a problem of typolink...

#4 Updated by Chris topher over 6 years ago

  • Category deleted (Communication)
  • Target version deleted (0)

#5 Updated by Mathias Schreiber almost 5 years ago

  • Status changed from New to Needs Feedback
  • Assignee set to Mathias Schreiber

adding &#hash doesn't cut it, right?

#6 Updated by Simon Schaufelberger almost 5 years ago

oh, i don't even remember where i have used that typoscript. It's 4 years ago :D Need to setup a test environment...

#7 Updated by Alexander Opitz over 4 years ago

Any news on this issue?

#8 Updated by Simon Schaufelberger over 4 years ago

still doesn't work as the menu rendering is still the same since ages...

#9 Updated by Alexander Opitz over 4 years ago

@Simon: Last time you wrote "Need to setup a test environment...". Your answer now is more like "you didn't test but assume that it didn't change", do I understand this correct?

#10 Updated by Simon Schaufelberger over 4 years ago

I didn't have a look into the source code but yes, I'm quite sure that it is still the same as I follow the release notes and there was nothing about it ;)

Could you have a look into it? Otherwise I will do it in the next few days.

#11 Updated by Susanne Moog over 4 years ago

FYI: additionalParams still does not work this way (as it expects url params, not anchors) but the behavior can be achieved by for example:

stdWrap.typolink.parameter.dataWrap = {field:uid}#navi

#12 Updated by Alexander Opitz about 4 years ago

  • Assignee changed from Mathias Schreiber to Simon Schaufelberger

Hi Simon,

what's the state of this issue?

#13 Updated by Alexander Opitz almost 4 years ago

  • Status changed from Needs Feedback to Closed
  • Assignee deleted (Simon Schaufelberger)

No feedback within the last 90 days => closing this issue.

If you think that this is the wrong decision or experience this issue again, then please write to the mailing list typo3.teams.bugs with issue number and an explanation or open a new ticket and add a relation to this ticket number.

Also available in: Atom PDF