Project

General

Profile

Actions

Feature #16249

closed

GMENU_LAYERS: 4 features / patch suggestions

Added by Ralf Hettinger over 18 years ago. Updated over 11 years ago.

Status:
Rejected
Priority:
Should have
Assignee:
-
Category:
-
Target version:
-
Start date:
2006-06-16
Due date:
% Done:

0%

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

Description

The attached patch suggests four modifications of the gmenu_layers.php:

1) A quickfix for hideMenuWhenNotOver set and Konqueror:

No idea if this is really necessary but I never figured out how to have collapsing GMENU_LAYERS working with Konqueror. It seems that mousout will always trigger Konqueror to hide the layers with hideMenuWhenNotOver set even if the mouse enters a submenu-layer. This renders GMENU_LAYERS unusable in Konqueror (at least that's my experience). The included fix will just ignore hideMenuWhenNotOver if the client is Konqueror - so this at best must be considered as a quickfix.

2) New TS parameter lockPosition_adjust.[uid of triggering Page/Item]

It sometimes is pretty handy to have a possibility for manual adjustment for the position of certain submenu layers. lockPosition_adjust.[uid] enables GMENU_LAYERS to do this: just replace [uid] with the id of the triggering Item (generally a page uid) and enter an int value as amount of pixels that is added/subtracted to the position where the submenu would pop with lockPosition set and the submenu for this uid will be displaced by that amount.

3) Changing JS triggered CSS positioning from 'left' to 'marginLeft' since marginLeft produces less "erratic" behaviour in situations where layers are positioned relativly (see 4)

4) Wrapping the layer divs by three additional div-containers

This suggests to have an easy possibility to position layers relativly (eg for centered layouts).

This goal can be achieved as well with relativeToTriggerItem and relativeToParentLayer or other more or less complex TS and wrapping setups. Though, imo these approaches tend to be quite complex (relativeToTriggerItem and relativeToParentLayer will solve it with JavaScript that is not that compatible regarding older browsers. Common other approaches will do the following by wrapping the body tag and the very first content, which isn't that clean and could be easily done by gmenu_layers.php).

With this patch, the layer-divs get wrapped by div#gmenu_layers_layerScopeBody div#gmenu_layers_layerScope1 div#gmenu_layers_layerScope2 and could be easily positioned.

Example for centered layout after applying this patch:

div#gmenu_layers_layerScopeBody {
width:100%;
text-align:center;
}
div#gmenu_layers_layerScope1 {
margin-left:auto;
margin-right:auto;
width:800px; /* width of centered layout /
text-align:left; /
alignment of centered navigation /
}
div#gmenu_layers_layerScope2 {
padding-left:100px; /
example for left offset inside the centered layout */
}

(issue imported from #M3685)


Files

gmenu_layers.php.diff (5.37 KB) gmenu_layers.php.diff Administrator Admin, 2006-06-16 14:37
gmenu_layers_corrected.php.diff (4.41 KB) gmenu_layers_corrected.php.diff Administrator Admin, 2006-06-16 14:51

Related issues 1 (0 open1 closed)

Related to TYPO3 Core - Task #46358: Separate ext:statictemplates code from coreClosed2013-03-16

Actions
Actions #1

Updated by Ralf Hettinger over 18 years ago

Previous patch contained unnecessary code. Sorry.
Please use gmenu_layers_corrected.php.diff

Actions #2

Updated by Christian Kuhn over 11 years ago

  • Category deleted (Communication)
  • Status changed from New to Rejected
  • Target version deleted (0)
  • PHP Version deleted (4)

With 6.1 issue #46358, the _layers menus where moved to statictemplates, and statictemplates was removed from core afterwards. This issue won't be solved in the core anymore.

Actions

Also available in: Atom PDF