[All Adaptavist Apps]
Excerpt |
---|
Menus can also be customised at space level using similar |
...
techniques... |
Menus are constructed using unordered lists of links - as such, you can create a list of links on a page then embed the links within your menus by using the include macro or import macro (see 1 - Space Level Panel Content for more details).
For example, let's say you have some menu notation on a page called "Space Menu" in your wiki:
No Format |
---|
{{excerpt} h2. Embedding links from a wiki page Menus are constructed using unordered lists of links - as such, you can create a list of links on a page then embed the links within your menus by using the [include macro|USERGUIDE:include macro] or [import macro|import macro] (see [1 - Space Level Panel Content] for more details). For example, let's say you have some menu notation on a page called "Space Menu" in your wiki: {code} {menu}View {compound-menuitem:news|icon=news|caption=News} {compound-menuitem:recent|icon=new|caption=Recent updates} {compound-menuitem:RSS|icon=rss|caption=RSS feed builder} {menuseparator} {compound-menuitem:index|icon=index|caption=Index} {compound-menuitem:map|icon=document_into|caption=Site map} {compound-menuitem:labels|icon=tag_purple|caption=Labels} {menuseparator} {compound-menuitem:mail|icon=mail|caption=Mail} {menuseparator} {compound-menuitem:children|caption=Show children (%count%)} {compound-menuitem:comments|caption=Show comments (%count%)} {menu} {code} |
Because
...
we're
...
using
...
the
...
context-sensitive
...
...
...
,
...
we
...
will
...
need
...
to
...
"import"
...
(rather
...
than
...
"include")
...
the
...
notation
...
in
...
to
...
the
...
menu
...
bar.
...
In
...
the
...
menu
...
panel,
...
use
...
syntax
...
like
...
the
...
following:
No Format |
---|
{code} {menubar} ... various static menu items ... {builder-show:page=Space Menu} {import:Space Menu} {builder-show} ... more static menu items ... {menubar} {code} |
If
...
the
...
"Space
...
Menu"
...
page
...
exists,
...
it'll
...
be
...
imported
...
directly
...
in
...
to
...
your
...
menu.
...
If
...
you're
...
not
...
sure
...
whether
...
the
...
list
...
of
...
links
...
will
...
contain
...
valid
...
markup,
...
you
...
should
...
wrap
...
the
...
imported
...
content
...
in
...
the
...
...
No Format |
---|
|wikimenu macro]: {code} {builder-show:page=Space Menu} {wikimenu} {import:Space Menu} {wikimenu} {builder-show} {code} |
The
...
wikimenu
...
macro
...
sanitizes
...
it's
...
content,
...
for
...
example
...
removing
...
unwanted
...
line
...
spaces,
...
invalid
...
markup,
...
etc.
...
...
...
...
...
...
...
Using
...
the
...
...
...
and/or
...
...
...
,
...
you
...
can
...
show
...
and
...
hide
...
blocks
...
of
...
menu
...
content
...
based
...
on
...
context.
...
For
...
example,
...
if
...
we
...
wanted
...
our
...
Space
...
Menu
...
from
...
the
...
example
...
above
...
to
...
only
...
appear
...
on
...
the
...
home
...
page,
...
we
...
could
...
use:
No Format |
---|
{code} {builder-show:page=Space Menu|title=Home} {wikimenu} {import:Space Menu} {wikimenu} {builder-show} {code} The {{page}} parameter checks to see if the page exists and the {{title}} parameter checks to see if the current page is called |
The page
parameter checks to see if the page exists and the title
parameter checks to see if the current page is called "Home".
...
The
...
menu
...
will
...
only
...
be
...
shown
...
if
...
both
...
conditions
...
are
...
met.
Align | ||
---|---|---|
| ||
Next page: 4 - Space Level Colours {align:right}\\ Next page: [4 - Space Level Colours]{align} |