Review main Merged

35953[TASK] Improve Layout of CType Menu in page module

Mathias Schreiber CR +2 V +2 Easy +37 −2 updated 01/17/15, 18:56

Commit message

CType menu will now display the selected menu_type and a headline.

Review

  • Code review CR +2
    • Mathias Schreiber +2
    • Philipp Gampe +1
  • Verified V +2
    • Mathias Schreiber +2
    • Philipp Gampe +1

Files 1

Review log 27

Show 2 earlier messages
  1. Mathias Schreiber uploaded patch set 1 01/11/15, 15:59

  2. Mathias Schreiber uploaded patch set 2 01/11/15, 16:41

  1. Mathias Schreiber uploaded patch set 3 01/11/15, 16:44

  2. Frans Saris commented on patch set 3 01/11/15, 17:39

    PageLayoutView.php:1528

    Is a comment starting with // not enough here?
  3. Frans Saris commented on patch set 3 V -1 01/11/15, 17:55

    PageLayoutView.php:1526

    There are menu types were no page selection is needed, so no pages are selected

    PageLayoutView.php:1530

    You need to find the correct array value where $GLOBALS['TCA']['tt_content']['columns']['menu_type']['config']['items'][?][1] = $row['menu_type'] The array key isn't the value to check but array value 1
  4. Daniel Maier commented on patch set 3 01/11/15, 19:04

    PageLayoutView.php:1530 Reply

    I think you could use BackendUtility::getLabelFromItemList to get the correct menu type here. Tested with that and it works for me: $selectedMenuType = BackendUtility::getLabelFromItemlist('tt_content','menu_type',$row['menu_type']);
  5. Mathias Schreiber uploaded patch set 4 01/11/15, 19:04

  6. Daniel Maier commented on patch set 4 01/11/15, 19:19

    PageLayoutView.php:1684

    As also used for categories now, $pageUidList doesn't fit any more. Perhaps you could take sth that reflects both pageUid and CategoryUid, or sth more general...
  7. Daniel Maier commented on patch set 4 01/11/15, 19:21

    PageLayoutView.php:1688

    See line 1684, same applies for $pageUid here
  8. Mathias Schreiber uploaded patch set 5 01/11/15, 19:42

  9. Daniel Maier voted on patch set 5 CR +1 V +1 01/11/15, 20:01

  10. Frans Saris commented on patch set 5 01/11/15, 20:10

    PageLayoutView.php:1528

    Why don't you use BackendUtility::getLabelFromItemlist() like Daniel suggested?

    PageLayoutView.php:1531

    Just use $row['menu_type']
  11. Michael Oehlhof voted on patch set 5 CR +1 V +1 01/11/15, 22:18

  12. Markus Klein uploaded patch set 10 01/13/15, 23:00

  13. Markus Klein voted on patch set 10 CR +1 01/13/15, 23:00

  14. Andreas Kienast voted on patch set 10 CR +1 V +1 01/17/15, 14:22

  15. Markus Klein commented on patch set 10 01/17/15, 15:39

    Maybe I'm totally on the wrong track with my question.

    PageLayoutView.php:1528

    is this always tt_content? What happens when this is a category menu?

    PageLayoutView.php:1530

    can't we use an (int) typecast and compare with !== 2?
  16. Mathias Schreiber commented on patch set 10 01/17/15, 15:44

    PageLayoutView.php:1528 Reply

    This one is getting the TCA label from the select in tt_content.menu_type. This as nothing to do with the type of menu being selected. Here's what I do: Even if you add your own menu type, or rename the label via TSConfig: it's always made sure the page module displays the correct label.

    PageLayoutView.php:1530 Reply

    sure, but why would we? The field always returns a string.. it's a varchar ;-) It's a special case for the menu type "Sitemap" which does not allow to select pages. But we need this check because you might have selected a different menu type and changed to "Sitemap" later on. In this case we do not want to show the list of selected pages, because it does not comply to the UI of the Backend.
  17. Philipp Gampe commented on patch set 10 01/17/15, 15:50

    this patch misses handling for invalid menu type values

    PageLayoutView.php:1528

    invalid menu type is not taken into account
  18. Markus Klein uploaded patch set 11 01/17/15, 17:14

  19. Markus Klein voted on patch set 11 CR +1 V +1 01/17/15, 18:04

  20. Daniel Maier voted on patch set 11 CR +1 V +1 01/17/15, 18:09

  21. Philipp Gampe voted on patch set 11 CR +2 V +2 01/17/15, 18:43

  22. Philipp Gampe updated the commit message in patch set 12 01/17/15, 18:53

  23. Mathias Schreiber voted on patch set 12 CR +2 V +2 01/17/15, 18:54

  24. Philipp Gampe voted on patch set 12 CR +1 V +1 01/17/15, 18:56

  25. Philipp Gampe merged patch set 12 01/17/15, 18:56