Linking Data to a summary page
13 posts by 3 authors in: Forums > CMS Builder
Last Post: October 27, 2011 (RSS)
I'm stuck on this one. I have a tours summary page (tours_summary.php), which when selected, is populated by the country image, the country intro and a summary of tours related to that country (only). This is done by // 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'";
and // load intro records
list($tourIntroRecords) = getRecords(array(
'tableName' => 'country_intros',
'where' => $tourIntroWhere,
I get that. However, I also want it to add (also in the table name 'country_intros') the
1) seo_title and
2) seo_description
How would I write this script to include that as well? Do I have to write another $tourIntroWhere = ?
I'm stuck. Any direction would help.
Thanks
Re: [degreesnorth] Linking Data to a summary page
By robin - October 19, 2011
Do you want to search by the SEO fileds or just display them?
Thanks,
Robin
Programmer
interactivetools.com
Re: [robin] Linking Data to a summary page
<title><?php echo $home_pageRecord['page_title'] ?> | Active Travel</title>
<meta name="description" content="<?php echo $home_pageRecord['meta_description'] ?>" />
Where I can control the contents of the SEO. The $home_pageRecord isn't the correct one, it should be $country_introRecord, but I don't know how to add that field on, for example, this page http://www.activetravel.com.au/tours_summary.php?country_list_keyword=Vietnam
Thanks
Re: [degreesnorth] Linking Data to a summary page
By robin - October 20, 2011
Is the problem that you want to have page_title or meta_description fields in your country section?
Thanks
Programmer
interactivetools.com
Re: [robin] Linking Data to a summary page
Re: [degreesnorth] Linking Data to a summary page
By Jason - October 24, 2011
Could you attach tours.php to this thread so we can see the code you're using? Also, could you let us know what fields are stored in your country section?
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] Linking Data to a summary page
country_name (list)
country_intro_copy
main_image (image)
top_right (image)
seo_page_title
seo_meta_description
There are other ones as well, but these are the main ones which should be pulled in to the tours.php
Thanks in advance.
Cheers
Carole
Re: [degreesnorth] Linking Data to a summary page
By Jason - October 25, 2011
I took a look at your page. Where does the country_name list field take it's values from? Is there a field in tours that shares the same value?
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] Linking Data to a summary page
Sorry, i noticed I just sent you the wrong file. Here's the correct tours_summary.php page.
Re: [degreesnorth] Linking Data to a summary page
By Jason - October 26, 2011
I can see that you retrieve the a record from country_intros here:
list($tourIntroRecords) = getRecords(array(
'tableName' => 'country_intros',
'where' => $tourIntroWhere,
));
$tourIntroRecord = @$tourIntroRecords[0]; // get first record
Can you then use this record to output your Meta Information?
example:
<title><?php echo $tourIntroRecord['seo_title'] ?> | Active Travel</title>
<meta name="description" content="<?php echo $tourIntroRecord['seo_description'] ?>" />
Hope this helps
Jason Sauchuk - Project Manager
interactivetools.com
Hire me! Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/