Review main Abandoned

2486[FEATURE] Set correct CUR state for shortcut menu items

Steffen Gebert CR 0 V 0 Easy +25 −5 updated 06/03/13, 20:49

Commit message

This change sets the CUR state also for a menu item, if it is a short-
cut to the current page.

Before it was not possible (without additional configuration) to
correctly use this structure for a website
  ROOT
  + Home (shortcut to ROOT)
  + Page1
  + …
The "Home" menu entry is now highlighted, when accessing "ROOT".

Review

  • Code review CR 0
  • Verified V 0

Issues 1

Files 1

Review log 19

  1. Stefan Neufeind commented on patch set 1 02/11/12, 16:36

    I would prefer that you didn't submit this Double-CUR is a no-go for me imho.
  2. Peter Russ commented on patch set 2 02/11/12, 16:36

    Fails; I would prefer that you didn't submit this
  3. Stefan Neufeind commented on patch set 2 02/11/12, 16:36

    Could you please make up your mind about this (conceptional) and handle the patch/feature-request accordingly?
  4. Oliver Hader uploaded patch set 2 02/11/12, 16:36

  5. Oliver Hader commented on patch set 2 02/11/12, 16:36

    Fails; I would prefer that you didn't submit this Rebasing to master V:-1, R:-1 V:0, R:-1 from Stefan Neufeind <typo3.neufeind@speedpartner.de> V:0, R:1 from Steffen Ritter <info@rs-websystems.de> V:0, R:1 from Thorben Kapp <thorben@work.de> V:-1, R:-1 from Jo Hasenau <info@cybercraft.de> V:0, R:-1 from Chris Zepernick <fd16eb301508c171fbd04f9e1b2f1021557e548e>
  6. Steffen Gebert commented on patch set 2 02/11/12, 16:36

    I'm also unsure, how to proceed..
  7. Steffen Ritter commented on patch set 1 02/11/12, 16:36

    Looks good to me, but someone else must approve I do no consider this as a problem with double "current states". I never saw shortcuts within the same menu (and level). Mostly it's really within different sections and so on. So i would really like to see this one in. Not tested yet, but I think it will prevent me from setting "alwaysActivePidList" TS on the linked page - which will be a performance gain...
  8. Philipp Gampe commented on patch set 2 02/11/12, 16:36

    I would like to have it optional. Sometimes I want shortcut pages have really have the active flag and sometimes I dont. Make it a setting for hmenu.
  9. Thorben Nissen commented on patch set 1 02/11/12, 16:36

    Well, the double CUR state could be a problem, but I think you should not have two menu items pointing to the same page. So solve this, we could introduce a menu config for TMENU like TMENU.shortcutCurState = 1, default is 0, so nothing changes by default.
  10. Thorben Nissen commented on patch set 1 02/11/12, 16:36

    Looks good to me, but someone else must approve I tested it and it works good. As Steffen said, the current double state should not be a problem.
  11. Thorben Nissen commented on patch set 1 02/11/12, 16:36

    I tried example 2: Prepending the menu with a home link with typoscript. That is good. But in connection with https://review.typo3.org/#change,3413 this might make sense, except the first subpage shortcut if it is shown in menu. Could an option like TMENU.shortcutCurState = 1 could a possible solution. So you can activate it if you have e.g. the first sub page not in menu.
  12. Jo Hasenau commented on patch set 1 02/11/12, 16:36

    I would prefer that you didn't submit this According to the description this would lead to a double CUR state wihtin just one menu, when both the shortcut page and the page it is pointing to are visible. As I already pointed out in the original thread on forge: A shortcut by definition should never be ACTive or CURrent itself. But it should always point directly to the page it is a shortcut to instead of having a rewrite after the click.
  13. Jo Hasenau commented on patch set 1 02/11/12, 16:36

    Fails Even if the pages that are connected via the shortcut might be in different sections of a menu you will still get a double CUR state. The problem most of the people got, who think that this patch is good and necessary is, that they are too lazy to create proper menu structures and therefor they use a shortcut i.e. to create a tree like this: Real Home - Home (Shortcut to Real Home) - Page 1 - Page 2 etc. instead of doing it like this Home - Page 1 - Page 2 and creating a menu setup that will put a link to Home in front of the first level. But there are lots of use cases where people are using it with the "first subpage" option like this: Real Home (shortcut to Home) - Home - Page 1 (shortcut to first subpage) - Page 1.1 - Page 1.2 - Page 2 - Page 3 (shortcut to first subpage) in the last example you will get a CUR state for both "Page 1" AND "Page 1.1", which is not just misleading but simply wrong. So IMHO introducing this behaviour will lead to a conceptual bug AND therefor a breaking change as well.
  14. Jo Hasenau commented on patch set 1 02/11/12, 16:36

    @Thorben: Even if a shortcut link will be pointing to the target page and not to the shortcut page - which is a good idea IMHO since it will avoid double content - the target page itself still will be different to the one that creates this link. So still there is only ONE page which is actually CURrent. There can't be more than one CURrent page by definition of the term "current". The fact that you would be using another workaround by setting the target page to "not in menu" IMHO shows that this concept doesn't work.
  15. Jo Hasenau commented on patch set 2 02/11/12, 16:36

    Fails; I would prefer that you didn't submit this It's not about testing the code but about the feature as such. Having ACT or CUR states for shortcuts is a conceptual bug.
  16. Mr. Jenkins commented on patch set 1 02/11/12, 16:36

  17. Mr. Jenkins commented on patch set 2 02/11/12, 16:36

  18. Chris Zepernick commented on patch set 1 02/11/12, 16:36

    I would prefer that you didn't submit this
  19. Steffen Gebert commented on patch set 2 02/11/12, 16:36

    Abandoned