Need to add testimonials to only certain pages...

11 posts by 2 authors in: Forums > CMS Builder
Last Post: May 22, 2009   (RSS)

By lterenzi - May 14, 2009

Hey everyone...

I have a client site (http://www.thewrapsource.com) that needs testimonials added to pages in their Gallery section. Now Ross from IT did a knock-out job at setting up the Gallery section of the CMS. He has it so the client can upload images and tell it what sections to show up on. I need to do the same thing but with testimonials.

I was going to have Ross do another CMS module for me but the money in the budget dried up so I have to try this on my own.

What is the best way for me to go about setting up a text entry area where I can then tell the text to only go on certain pages? They only want testimonials for people who have had Car Vehicle Wraps under "Cars" and so on...

To see how I want the testimonials formatted go here:

http://www.thewrapsource.com/indexTEST.php

The quotes will be images but the text I will format via CSS.

Any help (and I will need a lot I am sure :) will be appreciated.

Thank you!
Lenny
Best,
Lenny

Hey Monkey! Design
graphic design • web development • blog
--
lenny@heymonkeydesign.com
919•279•3301
--
web: www.heymonkeydesign.com
twitter: @heymonkeydesign

Re: [lterenzi] Need to add testimonials to only certain pages...

By ross - May 15, 2009

Hi Lenny

Good to hear from you :).

Let's give this a shot. The only thing is that I can't quite remember how your system was setup. When you are adding a new wrap, do you pick what kind of vehicle it's for from a drop down menu?

Or how does that happen. Perhaps you could email (not post in the forum) a link to your login page with login details so I can have a quick look.

Thanks!
-----------------------------------------------------------
Cheers,
Ross Fairbairn - Consulting
consulting@interactivetools.com

Hire me! Save time by getting our experts to help with your project.
Template changes, advanced features, full integration, whatever you
need. Whether you need one hour or fifty, get it done fast with
Priority Consulting: http://www.interactivetools.com/consulting/

Re: [lterenzi] Need to add testimonials to only certain pages...

By lterenzi - May 15, 2009

Hi Ross!

Thanks for jumping in regardless of this being a custom job or you helping me along the way. I was gong to email you directly but felt kind of bad since I felt as if I was asking for a "freebie."

I will email you and maybe you can help me along. I poked around at what you did but didn't have a lightbulb moment to link it together.
Best,
Lenny

Hey Monkey! Design
graphic design • web development • blog
--
lenny@heymonkeydesign.com
919•279•3301
--
web: www.heymonkeydesign.com
twitter: @heymonkeydesign

Re: [lterenzi] Need to add testimonials to only certain pages...

By ross - May 15, 2009

Hi Lenny

Thanks for getting me those links :). I needed to refresh my memory on how it was all setup. Let's keep things going in the forum so everyone can see how something like this works.

The process for your testimonials is basically going to be the same as the galleries. With each gallery, you tell it what vehicle type or what industry type it's in.

So in your tesimonials category, you are going to need at least the following fields:

Name - textbox (for the person who sent the testimonial)

Vehicle Type - drop down with same options as the gallery Vehicle Type field

Industry Type - drop down with same options as the gallery Industry Type field

Testimonial - wysiwyg or textbox so you can enter the testimonial.

That's the best place to start. Get your section setup with those fields and we'll move onto the next step from there.

Thanks!
-----------------------------------------------------------
Cheers,
Ross Fairbairn - Consulting
consulting@interactivetools.com

Hire me! Save time by getting our experts to help with your project.
Template changes, advanced features, full integration, whatever you
need. Whether you need one hour or fifty, get it done fast with
Priority Consulting: http://www.interactivetools.com/consulting/

Re: [ross] Need to add testimonials to only certain pages...

By lterenzi - May 18, 2009

Makes sense... I have all those setup. What's next? [:)]
Best,
Lenny

Hey Monkey! Design
graphic design • web development • blog
--
lenny@heymonkeydesign.com
919•279•3301
--
web: www.heymonkeydesign.com
twitter: @heymonkeydesign

Re: [lterenzi] Need to add testimonials to only certain pages...

By ross - May 19, 2009

Hi Lenny.

Great!

The next step is going to be adding the viewer code for your testimonial section to each of the pages you need testimonials. I recommend starting with just one page for now. My code example will be for one of the vehicle type pages your first page will want to be one too. The code is slightly different for the industry pages.

The code is going to look something like this:

<?php

require_once "/mnt/local/home/wrapnow/thewrapsource.com/cmsAdmin/lib/viewer_functions.php";

list($testimonialsRecords, $testimonialsMetaData) = getRecords(array(
'tableName' => 'testimonials',
'where' => "vehicle_type = 'something'",
));

?>


You'll notice that one part in there that says vehicle_type = 'something'"

For that, you need to replace "something" with the name of the vehicle type of the page you are working on.

The name will need to be exactly the same as how you have it in your database so make sure it's spelled the same way. You should actually be able to look at the viewer code that makes the images display. It will have a similar WHERE clause in it.

Once you have that setup, put the following code where you want the testimonials to show up:

<?php foreach ($testimonialsRecords as $record): ?>
Testimonial: <?php echo $record['testimonial'] ?><br/>
Name: <?php echo $record['name'] ?><br/>
<?php endforeach; ?>


And that should be it for now. You'll need to create some test listings (try creating some for a couple different vehicles just so you can see that they don't all show up on your one test page.

Let me know how you make out with all this. Thanks!
-----------------------------------------------------------
Cheers,
Ross Fairbairn - Consulting
consulting@interactivetools.com

Hire me! Save time by getting our experts to help with your project.
Template changes, advanced features, full integration, whatever you
need. Whether you need one hour or fifty, get it done fast with
Priority Consulting: http://www.interactivetools.com/consulting/

Re: [lterenzi] Need to add testimonials to only certain pages...

By ross - May 21, 2009

Hi Lenny

Thanks for the update!

That error message is coming from the fact that "title" is still in one of the fields in your section editor even though it was removed from the main list when you set up the testimonial section.

What you need to do is modify the testimonials section and up at the top, remove "title" from the 'ListPage Fields' textfield.

While you are there, click to the "Viewer Urls" and "Searching" tab to make sure it isn't there too. Once you remove it from those three fields, hit Save Table. Don't hit save table until it's removed from all three.

Give that a shot and let me know how you make out :).
-----------------------------------------------------------
Cheers,
Ross Fairbairn - Consulting
consulting@interactivetools.com

Hire me! Save time by getting our experts to help with your project.
Template changes, advanced features, full integration, whatever you
need. Whether you need one hour or fifty, get it done fast with
Priority Consulting: http://www.interactivetools.com/consulting/

Re: [ross] Need to add testimonials to only certain pages...

By lterenzi - May 21, 2009

Hi Ross -

I have poked around and cannot any instance of "title" anywhere... I will keep looking... Am I missing an area to look in? THis is all in CMSB correct?
Best,
Lenny

Hey Monkey! Design
graphic design • web development • blog
--
lenny@heymonkeydesign.com
919•279•3301
--
web: www.heymonkeydesign.com
twitter: @heymonkeydesign

Re: [lterenzi] Need to add testimonials to only certain pages...

By lterenzi - May 21, 2009

Duh... I found it. I am blind. :)
Best,
Lenny

Hey Monkey! Design
graphic design • web development • blog
--
lenny@heymonkeydesign.com
919•279•3301
--
web: www.heymonkeydesign.com
twitter: @heymonkeydesign