If you're in business, you know one the best ways to gain trust with your visitor is to let your happy customers share their experience (hopefully positive).
What we'll need
I'll assume you have MODx installed, ready to go, most likely already in production.
First, let's create a container for your testimonials, start by making a resource in your web root, then create a child resource.
You'll only need to worry about two fields:
Input the testimonial title or person's name.
Testimonial content, pretty simple.
Displaying the Testimonials
We'll start with the snippet call.
[[!getResources? &parents=`29` &tpl=`list-testimonials-tpl` &limit=`1` &includeContent=`1` &depth=`0` &sortby=`RAND()` ]]
&parents = the container ID
&tpl = chunk used for each testimonial
&limit = ony show one, change to 2 and see what happens
&sortBy = Sort them randomly
Goto your elements tab in MODx and create a chunk and name it "list-testimonials-tpl". Use the content below.
</div> <!-- eof item -->
Making it work
- Take the snippet calla nd past into your template where you'd like to display testimonials
- Change the parent ID to the one on your system
- Full up the testimonials container with more resources and watch it work.
Enjoy and post comments below.