Linking Data to a summary page

13 posts by 3 authors in: Forums > CMS Builder
Last Post: October 27, 2011   (RSS)

Hi Jason

If it was that easy I wouldn't have asked :)! No, that doesn't work, as I get an undefined index, which is why I contacted you in the first place!

There is no tourIntroRecords section editor.

1. there is a section editor for countries = countries list

// determine if a country was selected for searching
$tourIntroWhere = @$_REQUEST['country_list_keyword']
? "country_name LIKE '\t". mysql_real_escape_string( @$_REQUEST['country_list_keyword'] ) ."\t'"
: "title = 'Generic'";

// load intro records
list($tourIntroRecords) = getRecords(array(
'tableName' => 'country_intros',
'where' => $tourIntroWhere,
));
$tourIntroRecord = @$tourIntroRecords[0]; // get first record


2. there is a section editor for the details of each country = country_intros (this also contains the specific country SEO info which I want displayed depending on which country was selected)

3. there is a page tours_summary.php which pulls info from the various sections depending on the search

4. what I want to happen is that if they select Turkey for example, the tours_summary.php displays the image, page title, intro copy AND THE SEO INFO for that section. I don't know how to make it work so that if Turkey was selected as the country, it also then knows that the Turkey country_intro seo info needs to be added to.

Do I need to have another string of code as per 1 above, or can I just add to that, and if so how?

Thanks
Hi Jason

Yes, adding that seemed to have worked. I ended up getting a long list of Array( [_filename] => Egypt [_link] => javascript:alert('Set Detail Page Url for this section in: Admin > Section Editors > Viewer Urls') [accommodation] => [country_intro_copy] => Egypt has one of the oldest and most diverse cultural histories in the world and we love it. From the awe-inspiring temples of the Pharaohs to the architectural wonders of the Islamic period, a visit to this country is a fascinating journey through 5000 years of history. Along the way you'll encounter Greeks, Romans, Byzantines, Fatimids, Mamluks and Ottomans - to name but a few. Together with the bountiful Nile Valley, there's also some outstanding desert scenery - and a side-trip to Alexandria is a must. [country_name] => Egypt [country_name:labels] => Array etc, etc... then took the small piece of code out, and then it works.Thanks for that.  I don't understand it, but it works so am happy :)!Cheers