Is there a way to have the submenu() expandible? It would save a lot of page space (especially if the page has only a little text but many subpages).
There are many "pure CSS" solutions. But they require too much inline styling. I think anout something that would make it optional showing the menu collapsed or expanded. E.g. depending on number of subpages (e.g. having more than 5 subpages, show the submenu automatically collapsed).
Expandible submenu()
Expandible submenu()
CMSimple.sk
It's no shame to ask for an answer if all efforts failed.
But it's awful to ask without any effort to find the answer yourself.
It's no shame to ask for an answer if all efforts failed.
But it's awful to ask without any effort to find the answer yourself.
Re: Expandible submenu()
A little dirty (but working) solution:
In core.css new selectors
In tplfuncs.php find (#633)and replace by
The (+/-) may of course be placed before the "$tx['submenu']['heading']" and/or replaced by an image or styled howsoever in a <span> in core.css.
In core.css new selectors
Code: Select all
/* submenu*/
#submenu,
.show,
.hide:focus {display: none; }
.hide:focus + .show,
.hide:focus ~ #submenu {display: inline; }
@media print {
.hide, .show { display: none; }
}
Code: Select all
if (count($ta) != 0) {
return '<h4>' . $tx['submenu']['heading'] . '</h4>'
. li($ta, 'submenu');
Code: Select all
if (count($ta) != 0) {
/*return '<h4>' . $tx['submenu']['heading'] . '</h4>'.*/
return '
<a href="#" class="hide"><h4>' . $tx['submenu']['heading'] . '(+)</h4></a>
<a href="#" class="show"><h4>' . $tx['submenu']['heading'] . '(-)</h4></a>
<div id="submenu">'.
li($ta, 'submenu').
'</div>';
CMSimple.sk
It's no shame to ask for an answer if all efforts failed.
But it's awful to ask without any effort to find the answer yourself.
It's no shame to ask for an answer if all efforts failed.
But it's awful to ask without any effort to find the answer yourself.
Re: Expandible submenu()
Um, didn't work for me.Tata wrote:A little dirty (but working) solution:
However, why not simply:
Code: Select all
.submenu ul {display:none}
.submenu:hover ul {display:block}
/* h4 has to be changed if menu_levels != 3 */
.submenu h4:after {content: "(+)"}
Christoph M. Becker – Plugins for CMSimple_XH
Re: Expandible submenu()
Now I see, that the links do not work for me either. The submenu expands, but links are out of function. Why about?
CMSimple.sk
It's no shame to ask for an answer if all efforts failed.
But it's awful to ask without any effort to find the answer yourself.
It's no shame to ask for an answer if all efforts failed.
But it's awful to ask without any effort to find the answer yourself.
Re: Expandible submenu()
Ja, das funktioniert.
Es brauchte nur
und
Noch immer testweise am http://zomos.cmsimple.sk
Es brauchte nur
Code: Select all
if (count($ta) != 0) {
return '<div class="submenu"><h4>' . $tx['submenu']['heading'] . '</h4>'
. li($ta, 'submenu').'</div>';
Code: Select all
/* SUBMENU */
.submenu{ margin-top: 1rem;}
.submenu ul {display:none;}
.submenu:hover ul {display:block;}
/* h4 has to be changed if menu_levels != 3 */
.submenu h4:after {content: "(+)"}
CMSimple.sk
It's no shame to ask for an answer if all efforts failed.
But it's awful to ask without any effort to find the answer yourself.
It's no shame to ask for an answer if all efforts failed.
But it's awful to ask without any effort to find the answer yourself.