Creating a mktoList for icons/images? | Community
Skip to main content
austinc-2
New Participant
February 22, 2021
Solved

Creating a mktoList for icons/images?

  • February 22, 2021
  • 1 reply
  • 3309 views

Is there a way to create a list of 8-10 icons/images that would be used within a module? Something similar to a mktoList for text-color, or alignment for example.

 

I really have no idea if this is feasible, or worthwhile, but it's something that recently came to mind. Thanks in advance!

Best answer by PeterRy2

You can use the MktoList for this as well. It won't be the most beautiful solution / user experience but it will work.

It's worth to mention that the icon names (file name) have to match the list values.

 

Meta:

<meta class="mktoList" id="module-icon" mktoName="Icon" values="icon1,icon2,icon3" mktoModuleScope="true">

 

Code example:

<img src="assets.yourdomain.com/rs/123-XYZ-456/images/${module-icon}.png">

1 reply

PeterRy2Accepted solution
New Participant
February 22, 2021

You can use the MktoList for this as well. It won't be the most beautiful solution / user experience but it will work.

It's worth to mention that the icon names (file name) have to match the list values.

 

Meta:

<meta class="mktoList" id="module-icon" mktoName="Icon" values="icon1,icon2,icon3" mktoModuleScope="true">

 

Code example:

<img src="assets.yourdomain.com/rs/123-XYZ-456/images/${module-icon}.png">

austinc-2
austinc-2Author
New Participant
February 26, 2021

Exactly what I was envisioning, but wasn't sure if it was possible! Thanks so much!

 

A related inquiry.. is there a way to change the names of values in the dropdown list? 

 

For example:

<meta class="mktoList" id="text-color" mktoName="Text Color" values="#006341,#338267,#004f34" mktoModuleScope="true">

 

But the dropdown list would actually read something like:

Default Green

Light Green

Dark Green

 

 

Thanks again!

SanfordWhiteman
New Participant
February 26, 2021

Some people try adding a /* CSS comment */ in front of the hex code.