Project

General

Profile

Actions

Feature #64428

closed

group pages – show subpages of SPC in menu

Added by Benjamin Robinson almost 10 years ago. Updated about 2 years ago.

Status:
Closed
Priority:
Should have
Category:
Frontend
Target version:
-
Start date:
2015-01-22
Due date:
% Done:

100%

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

Description

It should be possible to show subpages of SPC-pages in menus. For example ...

lib.mymenu = HMENU
lib.mymenu{
    entryLevel = 0
    1 = TMENU
    1 {
        wrap = <ul>|</ul>
        expAll = 1
        NO {
            wrapItemAndSub = <li>|</li>
        }
        SPC<.NO
        SPC = 1
    }
    2<.1
}

... does not show the subpages of the spacers.

Maybe we need a new TMENU-property "expSpc = 1" or a new mode for expAll like "expAll = 2", because a lot of old installations may rely on the current state.

Sometimes it is really necessary to group pages without having content on their parent page, and only show the title of this parent page as a group-label (without being linked) in a menu.

Grouping in this way is only possible with spacers or sys-folder, but sys-folders are never shown in menus.
(Shortcut-pages are not an option, because they inevitably are linked.)

If spacers should in general only be used to separate and not to group pages, we should discuss:
  1. Do spacers even need a title?
  2. When to use spacers, when to use sys-folders, should it be possible to show sys-folders in menus or do we need a new pagetype (f.e. GRP - group)?
Actions #1

Updated by Mathias Schreiber almost 10 years ago

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

Hi Ben,

first off, I turned this into a Feature, because I think we can agree this is not a Bug :)

Here's the thing:
A spacer is a spacer - to be used to visually set pages in the Backend apart.
The SPC = 1 thingy can and should be used to alter the generated markup within the menu.

So far for the original plan.

Here's how you usecase should be done:
  • the "grouping" page should be a shortcut
  • the "grouping" page should just use "NO.doNotLinkIt = 1" in order to prevent the linking.

Does this help?

Actions #2

Updated by Benjamin Robinson almost 10 years ago

If "a spacer is a spacer", then a shortcut is a shortcut. :) It is only meant to make a shortcut to another page.

Yes, i thought about using a shortcut for grouping pages and it would be possible as doNotLinkIt has stdWrap: it would be possible to doNotLinkIt only if there's no shortcut-target.
But that is only a workaround.
Btw.: normal shortcut pages without a target still have an <a>-Tag without "href" :-(

Yet the symbol of the shortcut-page makes the use unmistakable.

Here's another workaround:

lib.mymenu = HMENU
lib.mymenu{
    entryLevel = 0
    1 = TMENU
    1 {
        wrap = <ul>|</ul>
        NO {
            wrapItemAndSub = <li>|</li>

            after.cObject = HMENU
            after.cObject{
                special = directory
                special.value.field = uid
                1 = TMENU
                1{
                    wrap = <ul>|</ul>
                    NO {
                        wrapItemAndSub = <li>|</li>
                    }
                }
            }
        }
        SPC<.NO
        SPC = 1
    }
}

The spacers's symbol would at least be fine for both usages. I agree that it would be worth thinking about renaming it to f.e. "space/group", or creating new page-type for grouping pages, or making it possible to show sys-folders (rename to just "folders") in menus, but a shortcut is not a solid solution, as it's title and symbol clearly pretend that it has a target.

Actions #3

Updated by Mathias Schreiber almost 10 years ago

Ben Robinson wrote:

If "a spacer is a spacer", then a shortcut is a shortcut. :) It is only meant to make a shortcut to another page.

Agreed.
I was just thinking about the implication of what would happen if someone called the URL of the grouping page directly.
I can see two different usecases here:
  • Redirect to a page of choice (covered by shortut)
  • throw a 404

What do you think?

Actions #4

Updated by Benjamin Robinson almost 10 years ago

It should behave like a sysfolder or spacer: standard-page-not-found-handling as defined in the install-tool (usually a 404).

Actions #5

Updated by Mathias Schreiber almost 10 years ago

  • Target version set to 7.2 (Frontend)
  • Complexity set to medium
Actions #6

Updated by Benjamin Robinson almost 10 years ago

We had a discussion about page-types and use-cases in issue 18079: https://forge.typo3.org/issues/18079
Should this be marked as "related issue"? The "slide"-feature is also important.
BTW: it will be necessary to discus how to handly such pages in "special = rootline" menus.

Actions #7

Updated by Mathias Schreiber almost 10 years ago

Ben Robinson wrote:

We had a discussion about page-types and use-cases in issue 18079: https://forge.typo3.org/issues/18079

I think it makes sense to keep a clear distinction between folders and pages.
With the "Grouping Page" or "Spacer" approach we have this distinction.

Should this be marked as "related issue"? The "slide"-feature is also important.

As long as we stay away from a folder, we're fine.

BTW: it will be necessary to discus how to handly such pages in "special = rootline" menus.

This one would work just like any other menu.
If you want it in your rootline, set to "doNotLinkIt", if now, set it do "doNotShowLink".

So I think we're save here

Actions #8

Updated by Benjamin Robinson almost 10 years ago

O.k.. I'll update the issue 18079 "slide of cObj CONTENT stops if sysfolder in rootline" to have a look at this one here. If we have a solution for grouping pages, there would not be any need to have a slide for sysfolder, because they won't be (ab-)used for grouping pages anymore.

Actions #9

Updated by Benni Mack over 9 years ago

  • Target version changed from 7.2 (Frontend) to 7.4 (Backend)
Actions #10

Updated by Susanne Moog over 9 years ago

  • Target version changed from 7.4 (Backend) to 7.5
Actions #11

Updated by Benni Mack about 9 years ago

  • Target version changed from 7.5 to 8 LTS
Actions #12

Updated by Alexander Opitz almost 9 years ago

After reading, the feature is adding a new page type for such groupings?

Doesn't a normal content page with doNotLinkIt do the same?

Actions #13

Updated by Benjamin Robinson almost 9 years ago

Yes, this could be a new page type.
No, a normal page does not have a special icon and would be available in the frontend.

Actions #14

Updated by Alexander Opitz almost 9 years ago

  • Status changed from Needs Feedback to New
Actions #15

Updated by Riccardo De Contardi over 7 years ago

  • Target version changed from 8 LTS to 9.0
Actions #16

Updated by Benjamin Robinson over 7 years ago

  • Subject changed from groupe pages – show subpages of SPC in menu to group pages – show subpages of SPC in menu
Actions #17

Updated by Susanne Moog almost 7 years ago

  • Target version deleted (9.0)
Actions #18

Updated by Riccardo De Contardi over 5 years ago

I tried a short test with TYPO3 9.5.8, using the MenuProcessor and following this example: https://www.thomaskieslich.de/blog/132-typo3-8-menues-mit-fluid-und-menuprocessor-erstellen/

as far as I can see, the subpages of a "spacer" page are still ignored; the only way to accomplish this feature by now seems to use EXT:vhs and v:menu with includeSpacers - see the documentation here: https://fluidtypo3.org/viewhelpers/vhs/master/MenuViewHelper.html

Actions #19

Updated by Christian Eßl about 5 years ago

  • Category set to Frontend
Actions #21

Updated by Gerrit Code Review almost 3 years ago

  • Status changed from New to Under Review

Patch set 1 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/72807

Actions #22

Updated by Gerrit Code Review almost 3 years ago

Patch set 2 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/72807

Actions #23

Updated by Gerrit Code Review almost 3 years ago

Patch set 1 for branch 11.5 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/72840

Actions #24

Updated by Benni Mack almost 3 years ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100
Actions #25

Updated by Benni Mack about 2 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF