[All Adaptavist Apps]
This tutorial shows you how to customise items on the View and Edit menus...
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:
Class |
Menu Path |
Notes |
Availability |
---|---|---|---|
|
View |
The View menu item on the menu bar |
Always |
|
View |
The menu that appears when you open the View menu. |
Always |
|
View > This Page |
The This page menu item at the top of the View menu. |
Always |
|
View > This Page |
The menu that appears when you open the This Page menu. |
Always |
|
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. |
|
View > This Page > Printable View |
The Printable View item on the This Page menu |
Always |
More to follow...
To hide the News item on the View > Other Pages menu, use:
.menu-news { display: none; visibility: false; }
Never hide the first item on a sub-menu as it will cause subsequent views of the menu to move further and further down the screen, evenually dissapearing!
To hide the separator under the Home Page item on the View > Other Pages menu, use:
.menu-separator-1 { display: none; visibility: false; }
To hide the Account item on the View menu (and therefore the whole Account sub-menu), use:
.menu-account { display: none; visibility: false; }
As you've probably noticed, the View menu and it's This Page menu item have sprouted Italian and Japanese translations. Here's how it was done.
.menu-view div:before { content: "Vista/"; } .menu-view div:after { content: "/??"; } .menu-this-page td.label:before { content: "Questa Pagina/" } .menu-this-page td.label:after { content: "/?????"; }
To set the background colour of the Other Pages sub-menu on the View menu, use:
.sub-menu-other-pages div div div div { background-color: #FFFFC0; }
To set the background colour of the Printable View on the View > This Page menu, use:
.menu-printable-view { background-color: #C0FFFF; }
/* hide menu item */
.menu-news {
display: none;
visibility: false;
}
/* hide menu separator */
.menu-separator-1 {
display: none;
visibility: false;
}
/* hide menu item and it's sub-menu */
.menu-account {
display: none;
visibility: false;
}
.menu-printable-view {
background-color: #C0FFFF;
}
.sub-menu-other-pages div div div div {
background-color: #FFFFC0;
}
.menu-news, .menu-separator-1 {
display: none;
visibility: false;
}
.menu-view div:before {
content: "Vista/";
}
.menu-view div:after {
content: "/??";
}
.menu-this-page td.label:before {
content: "Questa Pagina/"
}
.menu-this-page td.label:after {
content: "/?????";
}