Get record from Title name

9 posts by 3 authors in: Forums > CMS Builder
Last Post: June 16, 2013   (RSS)

By dccreatives - May 20, 2013 - edited: May 20, 2013

I have some code which I switched around. 

Currently, my page returns results with this: 


<?php echo $record['mounting'] ?>

I want it to return the title for each mounting record, not the name. How do I do this.

See it live here: http://www.axislighting.com/CMS_french/search_products.php

This page returns the results on the right. The pendant, wall is english and i added french to the title for the french pages.

Thank You.

By gregThomas - May 20, 2013

Hi,

Is the name of your title field title in the CMS? If so you should just need to change the field to this:

<?php echo $record['title'] ?>

If you're unsure of the name of the field, you can log into your CMS Builder admin area, then go to the Section Editor area, click the modify link on the items section, and on the section editors page look for the fields name in the field name column.

Let me know if you have any questions.

Thanks!

Greg

Greg Thomas







PHP Programmer - interactivetools.com

By dccreatives - May 20, 2013

The search results page reads from other pages.

Did you see the attached file?

Mounting is a section. Within mounting there is name and title.

Right now this code is giving me  <?php echo $record['mounting'] ?>

The mounting name automatically without the title.

I made the title french and I want it to show the french on this page without redoing the whole section and applying it...

Thanks.

By gregThomas - May 20, 2013

Hi,

I can't see anywhere the attached file references a mounting section. How is the mounting section linked to the items section? Is via this method:

http://www.interactivetools.com/kb/article.php?Populate-a-list-field-from-another-section-15

With the mounting field linking to the mounting section? 

Thanks!

Greg

Greg Thomas







PHP Programmer - interactivetools.com

By dccreatives - May 20, 2013

yes. 

Here is the search results page

Attachments:

search_products_001.php 7K

By dccreatives - May 21, 2013

I added the script that you gave me.

You can see the error here.

http://www.axislighting.com/CMS_french/search_products-f.php

It was pulling the mounting type from the items from the mounting fields and it took the name. Now I want it to take the title and it is getting complicated...

By gregThomas - May 21, 2013

Hi,

Could you fill in a second level support request for me? You can find the form here:

https://www.interactivetools.com/support/email_support_form.php

Then I can take a closer look at how you have your sections set up.

Thanks

Greg

Greg Thomas







PHP Programmer - interactivetools.com

By Deborah - June 16, 2013

Greg,

I just had to reply to say this code worked PERFECTLY for me and was just what I needed today for a project on deadline.

Always happy the forum is here for us all to learn from. Thanks so much for this post!

~ Deborah