Working on my first EE site for a small business, and have read the documentation but am obviously missing something and would greatly appreciate if somebody could help to steer me in the right direction.
The site is utilizing a unique design for the homepage plus one innerpage design to handle the rest of the site.
To acheive this, I have created three Channels
- Homepage Content
- Page Content
- Testimonials
and 3 Custom Channel Fields
- Homepage Content - with 13 fields for content (will need to add more for metadata)
- Page Content - with 3 fields for content (will need to add more for metadata)
- Testimonials - with 6 fields for content
Each of the above Channel Fields is added to a Field Group of the same name, so Testimonials is within a Field Group called Testimonials.
The Homepage Channel is used only once, but the Page Content Channel is used for the remaining 30 or so pages of the site. We have created pages and used the Page Content Channel successfully to add content for the site and everything is working great.
I have created one template group called “desktop” (will add other groups such as “mobile” and “iPad”, etc) and within that have created many templates such as:
- html_header
- header
- banner
- index
- innerpage
- sidebar
- nav_main
- nav_sidebar
- nav_footer
- footer
- css_min
I have all of these templates and Channel Entries working perfectly together.
The only problem is with the Testimonials Channel, which is supposed to display a text only slideshow of customer testimonials within the sidebar of the site.
I created two sample Entries within the Testimonials Channel and then added the following code to my sidebar template (as well as the appropriate javascript to the site):
<!-- end testimonial-slideshow -->
<div id="testimonial-slideshow">
<ul>
{exp:channel:entries channel="testimonials"}
<li>
<blockquote>
{testimonial_snippet}
</blockquote>
<span>
{quotee_fname}{if quotee_lname} {quotee_lname}{/if}{if quotee_business} - {quotee_business}{/if}{if quotee_location}
{quotee_location}{/if}
</span>
</li>
{/exp:channel:entries }
</ul>
</div>
<!-- end testimonial-slideshow -->This all works great…
BUT ONLY ON THE HOMEPAGE !!! - which uses the Homepage Content Channel and the “index” template, among others
As soon as you click on any of the other pages, which use the Page Content Channel, plus the “innerpage” template, plus all of the other same templates as the homepage (header, sidebar, etc), the testimonials do not show up.
Any of the inner pages will only display:
<!-- end testimonial-slideshow -->
<div id="testimonial-slideshow">
<ul>
</ul>
</div>
<!-- end testimonial-slideshow -->So none of the Entry data for the Testimonials Channel is getting through, except on the homepage where everything works as expected.
While searching for a solution, I read in an unofficial online EE2 tutorial that snippets were a better choice for things like sidebars, menus, footers, etc, so I tried placing my testimonials slideshow code from above into a snippet, and then adding the snippet into the sidebar, but it results in the exact same thing. The slideshow works on the homepage but not on any of the innerpages.
What am I missing???
How can I make a Channel and all of it’s Entries available to any template and any page of the site?
Thank you for taking the time to read this far and for any and all help you may have to offer. It is all greatly appreciated.