parentNum:label

4 posts by 2 authors in: Forums > CMS Builder
Last Post: May 27, 2016   (RSS)

By Toledoh - May 24, 2016

Hey Guys,

I'm trying to find out how to get the "label" rather than the "value" of <?php echo ($selectedCategory['parentNum']) ?>

Any ideas?

Cheers,

Tim (toledoh.com.au)

By Damon - May 26, 2016

Hi Tim,

Tyr this code. Change names to match your code.

<?php foreach ($categoryRecords as $parentRecord): ?>
  <?php if($selectedCategory['parentNum'] == $parentRecord['num']) : ?>
    Parent name: <?php echo $parentRecord['name'] ?><br />
  <?php endif; ?>
<?php endforeach; ?>

Let me know if this works for you.

Cheers,
Damon Edis - interactivetools.com

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

By Damon - May 27, 2016

Hi Tim,

I was chatting with Ross and neither of us has had this come up. To add this functionality, extra code would need to be written in the backend and then run every time to return that specific psuedo field value.  Right now, the same result can be done with custom code. My code was just one example way of doing it. 

I have already discussed this with Dave as something you are interested in seeing added.

Thanks!

Cheers,
Damon Edis - interactivetools.com

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