Webal Phoca Mega Menu Content shows your Phoca Cart categories or brands as a list of links. Each one can have a picture, a name and a short text. A category can also list its sub-categories under it.
It is made to sit inside a mega menu from Webal Blocks, and it works on an ordinary page too. The names, pictures and links come from Phoca Cart, so the list always agrees with your shop. It works with scripts switched off.
This module is part of Webal Phoca Blocks, which needs Phoca Cart 6 or later.
Tip. A mega menu is a wide panel that opens under a menu item. It is made in Webal Blocks, under Mega menus. A category is a group of products in Phoca Cart, such as Shoes. A sub-category is a category inside another one, such as Boots inside Shoes. A brand is a maker of your products.
Put it in a mega menu
A mega menu holds columns. A column can show one module, and that is how this module gets into the panel. These steps follow the order of the screens in Joomla. Nothing is saved until you press Save.
- Log in to the Joomla administrator. In the menu on the left, choose Content, then Site Modules.
- Press New. A list of module types opens.
- Choose Webal Phoca Mega Menu Content from the list.
- Type a Title for the module. Joomla shows it only in the list of modules. Leave the Title box on the Module tab empty.
- On the Module tab, under Content, choose Show: shop categories or shop brands. Choose how many items to show.
- Make sure the module is Published and that its Access suits your visitors. You do not need to choose a position or a menu assignment for use in a mega menu.
- Press Save & Close.
- Open Webal Blocks, then Mega menus. Open the mega menu, or press New and choose the menu item in Opens from this menu item.
- Add a column in the Columns list. Under What this column shows, choose One module, then pick Webal Phoca Mega Menu Content in the Module box.
- Type a short label in the column's Heading box, such as "Shop by category". The mega menu prints it above the list.
- Press Save, then open your site and open the menu item. The list is in the panel.
Accessibility. The menu already has its own landmark, so this module adds none inside it. By default each name is plain bold text and not a heading, so the headings of the page stay in order. If you choose a heading level for the names, pick one level below the heading above the menu, and never skip a level.
On a phone the mega menu turns into a list inside the phone menu, and the module is in it, in one column.
Use it on a page
Choose a Position and the Menu Assignment as for any module. If you type a Title on the Module tab, set Show Title to Hide, because the Title you type IS the heading.
On a page the block is a named section, so that screen readers can find it. It is named by the Title, or by the module's own title if you left the Title empty. Inside a mega menu it is a plain block unless you typed a Title, because the menu is already a named area.
Options
Module tab
| Option | What it does | Default |
|---|---|---|
| Title | An optional heading above the list. Leave it empty in a mega menu. | No title |
| Show | Shop categories, or shop brands. | Shop categories |
| Most items | The most categories or brands shown, from 1 to 60. | 6 |
| Order | As ordered in Phoca Cart, the reverse, by name, by date, or by number of products. | As ordered in Phoca Cart |
| Only these categories | Categories only. The numbers of the categories to show, with commas between them. The list starts at the top level, so a sub-category listed on its own shows nothing. List its parent too. Saving refuses a number that is not a Phoca Cart category. | Empty (every category) |
| Hide these categories | Categories only. The numbers of the categories to leave out. A hidden category takes its sub-categories with it. | Empty (none) |
| Show the sub-categories | Categories only. Lists the sub-categories under each category, as links. | On |
| Most sub-categories under each | From 1 to 50. A short list keeps the panel from growing very tall. Phoca Cart's own module shows all of them. | 12 |
| Leave out ones with no products | Leaves out a category or brand that Phoca Cart counts no products in. | Off |
| Only the page language | For a site with more than one language. Shows the ones made for the language of the page and the ones made for all languages. | Off |
Items tab
| Option | What it does | Default |
|---|---|---|
| Show the name | Prints the name of each category or brand. If you switch it off while the picture is shown, the picture carries the name for screen readers. | On |
| Name as | Plain bold text, or a heading of level 2 to 6. Phoca Cart's own module always uses a level 3 heading. Plain text is better in a menu, because a menu comes before the main heading of the page. | Plain bold text |
| Link the name and picture | Makes them links. Sub-categories are always links. | On |
| Show the picture | The category picture or the brand logo. An item with no picture shows none. Where the name is shown, the picture is decoration. | On |
| Category picture size | Small, medium or large, from the sizes Phoca Cart has made. The special picture of a category is used as it is. | Small |
| Picture height | Small, medium or large. A category picture is trimmed to fit. A brand logo is shown whole, on a light plate. | Medium |
| Show the short text | The first words of the description in Phoca Cart, as plain text. Formatting and pictures in the description are not shown. | On |
| Longest short text | From 20 to 300 characters. A longer text is cut with three dots. | 100 |
| Columns and Last row | How many items fit in a row at each screen size, and what to do with a short last row. The columns follow the width of the module's own box, so a narrow mega menu column shows one column. See the Grid group. | 1, 2, 3 and 4 columns |
The Layout tab and the Animation tab hold the same shared groups as other Webal modules. See the General, Spacing, Width, Colour scheme and Animation groups.
Caching
The list is the same for every visitor who is not signed in, and it does not depend on the page. So Joomla's Caching option is offered on the Advanced tab, set to Use Global. Leave it there if your mega menu is cached. A cached mega menu leaves out any module that does not allow caching. If caching is on, a change in your shop shows after the cache time.
For keyboards and screen readers
- The items are one real list. Every link can be reached with the Tab key, in the order of the page.
- The module never adds a navigation area of its own. In a mega menu it adds no area at all.
- When a name is printed, the picture beside it is decoration. Its own link is skipped by the keyboard and by screen readers, because the name is the link.
- When the name is hidden, the picture is the link and its text description is the name.
- Every link is at least 44 pixels high. The focus ring is 3 pixels thick.
- In a mega menu, press Escape to close the panel. The focus goes back to the menu button.