neoTopMenu as Images - Forum

Forum Navigation
You need to log in to create posts and topics.

neoTopMenu as Images

Is it possible to have Images instead of text on the menu, or is this possible with another plugin.

@m-burdess note that neoTopMenuAddItem command allows to include HTML so you can add an image there (.png, .gif, .svg and their Base64 versions).

Try this:

neoTopMenuInitialize "Container1" "" "" "Default" "Default"
neoTopMenuAddItem "Container1" "<svg style='width:22px;align:left' viewBox='0 0 448 512'><path d='M433.941 129.941l-83.882-83.882A48 48 0 0 0 316.118 32H48C21.49 32 0 53.49 0 80v352c0 26.51 21.49 48 48 48h352c26.51 0 48-21.49 48-48V163.882a48 48 0 0 0-14.059-33.941zM224 416c-35.346 0-64-28.654-64-64 0-35.346 28.654-64 64-64s64 28.654 64 64c0 35.346-28.654 64-64 64zm96-304.52V212c0 6.627-5.373 12-12 12H76c-6.627 0-12-5.373-12-12V108c0-6.627 5.373-12 12-12h228.52c3.183 0 6.235 1.264 8.485 3.515l3.48 3.48A11.996 11.996 0 0 1 320 111.48z'/></svg>" "Left" "https://sinlios.com"

Regards.

@luishp

Thank you, I understand the first half of the line "neoTopMenuAddItem" but not from

viewBox='0 0 448 512'><path

I think this is due to it being a way of writing I have not used before.

@m-burdess that's the image in SVG inline format. You can do something like this instead:

neoTopMenuInitialize "Container1" "" "" "Default" "Default"
neoTopMenuAddItem "Container1" "<img src='https://yourdomain/yourfolder/yourimage.png'>" "Left" "https://sinlios.com"

Or this if you include the image in your project (you will need to compile the project):

neoTopMenuInitialize "Container1" "" "" "Default" "Default"
neoTopMenuAddItem "Container1" "<img src='/img/myimage.png'>" "Left" "https://sinlios.com"

Regards.

 

javadrajabihakami has reacted to this post.
javadrajabihakami

@luishp

Thank you for the help, I have been looking on Youtube and found a person that showed the coding within the SVG file.

Regards