Displaying Different name from a "List" field

7 posts by 2 authors in: Forums > CMS Builder
Last Post: November 6, 2012   (RSS)

By efi-revivo - November 1, 2012 - edited: November 1, 2012

How can i show a different name in list option instead of "name" to "iconhebrew"

When i insert this line; <?php echo htmlspecialchars($vehicleListed) ?> it's show the name only - and I want to show something else.

<?php $vehicleList = getListLabels('listing', 'icons', $listingRecord['icons']) ?>
<?php foreach($vehicleList as $vehicleListed): ?>
<?php if ($listingRecord['icons']): ?>
<img src="icons/<?php echo htmlspecialchars($vehicleListed) ?>.png" alt="Different name (iconhebrew field instead of name)" width="25" height="25" border="0" title="<?php echo htmlspecialchars($vehicleListed) ?>"/>
<?php endif ?>
<?php endforeach ?>


Thanks,
Efi

Re: [efi-revivo] Displaying Different name from a "List" field

By Jason - November 1, 2012

Hi Efi,

Where is the iconhebrew field stored? Is the icons lsit field in ListingRecord being populated by a different section? If so, what is that section called, and what is the list value in then "icons" field?

Let me know and we should be able to put together an example for you.

Thanks
---------------------------------------------------
Jason Sauchuk - Project Manager
interactivetools.com

Hire me! Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/

Re: [Jason] Displaying Different name from a "List" field

Hi Jason,

iconhebrew stored inside icons table (category section)
under the "name" i insert a new field "iconhebrew"

the listing section use this table for icons in our site

The "name" field is for english and iconhebrew is for hebrew.

Re: [efi-revivo] Displaying Different name from a "List" field

By Jason - November 1, 2012

Hi,

What field is used for the option value for "icon" in the listing section?
---------------------------------------------------
Jason Sauchuk - Project Manager
interactivetools.com

Hire me! Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/

Re: [Jason] Displaying Different name from a "List" field

By efi-revivo - November 1, 2012 - edited: November 4, 2012

Hi,

for field option values i use"name"
for the image name.

and for field option labels i use "iconhebrew"

Thanks,
Efi

Re: [Jason] Displaying Different name from a "List" field

Thanks Jason :-)