Changing image tiles on menu in NAV Anywhere

Summary

Menu tiles represent a mobile process. Since version 4 of NAV Anywhere menu tiles are supported, and images can be displayed.

image_any_menu

Style sheets (CSS) are used to render web pages based on pre-installed CSS definitions. Menu tiles are displayed making use of this definition and the media library folder to display a picture.

Processes that are visible from the menu can be equipped with an image (not required) to provide an easy recognition of its functionality.

Example

An example will reveal how to include a picture on the tile. For two styles we have included media images that are or can be used.

Menu Process in NAV

To display a picture, the Portal uses a CSS file to determine which picture to show. In the Process “Main Menu”, each Control has a specific label text which has to correspond with the MenuButton in the CSS file.

image_any_menucontrols

Add Process to Menu

For this example, we add a new Process “Get Location” to the Main Menu Process:

image_any_addcontrol

Release the Main Menu process.

Setup Role Authorization for Process

Make sure the process is authorized to ensure the process is visible in the menu:

image_any_authprocess

Check User for Role permission

Make sure the user has the corresponding Role, which includes the new process.

image_any_authuser

Result of adding process to Menu in browser

The actions above result in having an additional process available “Get Location”. No image is showing as we have not applied the required steps for this.

image_any_menublanktile

Locate Image

Displaying an image on the menu requires the use of the Media folder. In this example we will use an existing image, but new images can be added to fit the purpose of the process.

Located in the folder “TI – Light” you will find a library of tiles to choose from. (Default folder location: C:\inetpub\wwwroot\DAW\TST\Portal\Files\Media\TI – Light)

image_any_mediafolder

The Media folder contains a folder for each Style; in this example we use the “TI – Light” style to explain the behavior. The other style that supports images is “DAW – Metro”.

Add reference to menu tile and image

Open the CSS file and scroll to the input.Menubutton lines (Default folder location: C:\inetpub\wwwroot\DAW\TST\Portal\Code\Css\).

image_any_cssfolder

Add this code below the existing list of MenuButton definitions and change the values in orange:

input.MenuButton[value=”Get Location“]
{
background: url(‘../../Files/Media/TI – Light/pallet-info.png‘) no-repeat center #D3D7DC;
}

Note! Make sure the value is the same as the label on the control in the Menu (case sensitive).

image_any_cssmodification

Now save the file. If you have no permission to store the file, save the file in your Documents folder and copy the file to overwrite it in the destination folder (Default folder location: C:\inetpub\wwwroot\DAW\TST\Portal\Code\Css\).

Result in the browser

The image should be visible when the menu is revisited.

image_any_menuimagetile

If the image is not showing immediately, please press Ctrl+F5 for a browser cache clearance.

About Nico

As the Product Owner, Nico van Wijk is responsible for our Enterprise Mobility and Business Integration Solutions for Microsoft Dynamics NAV. Nico manages all aspects of customer project delivery from initial planning to retaining a customer for life. That challenges him to provide leadership and insight to blended teams of contributors from To-Increase, the customer organizations, and partners. He also participates in setting the direction and driving the development of the mobile and integration solutions. In his years with To-Increase and, earlier, with Dynamics Anywhere, Nico has played a part in the rapid evolution of mobility, supported by increasingly powerful capabilities. Before that, he was a developer for Microsoft Dynamics NAV solutions at Qurius (now Prodware), the large European Dynamics partner. Nico has a B.A. electrical engineering degree from the HZ University of Applied Sciences. When away from work, Nico loves to travel and explore the world.
This entry was posted in Enterprise Mobility, NAV Anywhere. Bookmark the permalink.

Leave a comment