[All Adaptavist Apps]

Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Wiki Markup
h1. Customising the View and Edit Menus
{scrollbar:no-css=true}

*{excerpt}This tutorial shows you how to customise items on the View and Edit menus...{excerpt}*

h2. Menu Classes

The menu items on the view and edit menu each have a unique ??class name?? that allows them to be customised using style sheets.

We'll discuss the various style sheets that can be applied later in this tutorial, but first you will need to know what all the class names are and which menus they relate to:
{div}
||Class||Menu Path||Notes||Availability||
||{{menu-view}}|View|The ??View?? menu item on the menu bar|Always|
||{{sub-menu-view}}|View|The menu that appears when you open the ??View?? menu.|Always|
||{{menu-this-page}}|View > This Page|The ??This page?? menu item at the top of the ??View?? menu.|Always|
||{{sub-menu-this-page}}|View > This Page|The menu that appears when you open the ??This Page?? menu.|Always|
||{{menu-normal-view}}|View > This Page > Normal View|The ??Normal View?? menu item at the top of the ??This Page?? menu.|Always, except when creating a new page or news item.|
||{{menu-printable-view}}|View > This Page > Printable View|The ??Printable View?? item on the ??This Page?? menu|Always|
{div}
More to follow...

h2. Style Sheets

h3. Hiding Menu Items

To hide a menuthe ??Home Page?? item, add a new style to on the [Builder Theme Configuration] as shown in the example below??View > Other Pages?? menu, use:

{noformat}.menu-separatorhome-2page, .menu-separator-mail1 {
 display: none;
 visibility: false;
}
{noformat}

This will hideBecause there is a separator bar below the ??MailHome Page?? item on the ??View?? menu. Because that item has, we've also hidden that (it would have looked strange having a separator barat abovethe it, we've also hidden thattop of the sub menu).

h3. Text Prefixes and Suffixes

As you've probably noticed, the ??View?? menu and it's ??Account?? menu item have sprouted Italian and Japanese translations. Here's how it was done.

{noformat}
.menu-view div:before {
 content: "Vista/";
}

.menu-view div:after {
 content: "/??";
}

.menu-account td.label:before {
 content: "Cliente/"
}

.menu-account td.label:after {
 content: "/??";
}
{noformat}

We applied the style just to this page by using the [style macro].

h2. Colours

To set the background colour of the ??Other Pages?? sub-menu on the ??View?? menu, use:

{noformat}
.sub-menu-other-pages div div div div {
 background-color: #FFFFC0;
}
{noformat}

To set the background colour of the ??Printable View?? on the ??View > This Page?? menu, use:

{noformat}
.menu-printable-view {
 background-color: #C0FFFF;
}
{noformat}

{style}
.menu-printable-view {
 background-color: #C0FFFF;
}

.sub-menu-other-pages div div div div {
 background-color: #FFFFC0;
}

.menu-separatorhome-2page, .menu-mailseparator-1 {
 display: none;
 visibility: false;
}

.menu-view div:before {
 content: "Vista/";
}

.menu-view div:after {
 content: "/??";
}

.menu-account td.label:before {
 content: "Cliente/"
}

.menu-account td.label:after {
 content: "/??";
}
{style}