Project

General

Profile

Actions

Bug #14944

closed

maxItems of HMENU displays all menu-entries if set to zero

Added by Sacha Vorbeck about 19 years ago. Updated over 13 years ago.

Status:
Rejected
Priority:
Should have
Assignee:
-
Category:
Frontend
Target version:
-
Start date:
2005-08-25
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
4.0
PHP Version:
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

If you set the value of the HMENU maxItems property to zero, The HMENU displays all available menu-entries. I`d rather expect it to display no entries at all. This way, you cannot hide a menu just by setting the maxItems property to zero.

This makes sense if you set the value of maxItems via a constant e.g.
sitesettings.maxMenuEntries and would like the menu to disappear when this constant is set to zero.

A workaround would be to use if:

temp.mymenu= COA
temp.mymenu {
20 = HMENU
20 {
special = directory
special.value = {$entry_id}
maxItems = {$max_amount}
1 = TMENU
1 {
NO {
linkWrap = <strong>|</strong>
}
}
}
stdWrap.if {
value = {$max_amount}
equals = 0
negate = 1
}
}
(issue imported from #M1406)

Actions #1

Updated by Michael Stucki about 19 years ago

Hmm, by setting maxItems=0 you say that you want no (or in this case: all) ITEMS, you don't say that you want no MENUE!

I don't think this is a bug. It's the correct behaviour.

Actions #2

Updated by Wolfgang Klinger over 18 years ago

What should we do here then?
I have the same opinion as Sacha, if I set maxItems to 0 I expect the menu to have 0 items.

Actions #3

Updated by Susanne Moog over 13 years ago

  • Status changed from Needs Feedback to Rejected
  • Target version deleted (0)
  • TYPO3 Version changed from 3.8.0 to 4.0
  • PHP Version deleted (5)

This behaves as it should, maxItems = 0 means no limit, as in lots of other places 0 is as if it is not set at all.

Actions

Also available in: Atom PDF