1

I am designing a site just now that has a 'reviews' section and in that section each review can be categorised, e.g. 'Album Review', 'Live Review', 'Press Review' etc.

The url structure I have is:
www.mysite.com/reviews/album/actual-album-review
www.mysite.com/reviews/live/actual-live-review

I can get my categories to display in the sidebar and when each one is clicked it filters the reviews to the correct categories but the links to those reviews, when clicked, don't show the actual reviews, just the list of entries again. The reviews are listings of the reviews page.

Can anyone shed any light on how to get this working? I've been scratching my head for a few hours now!

I am using the latest version of EE, Structure and Freebie - I also have Zoo Triggers but I am having more joy with Freebie so the template code relates to this.

My template code:

<div class="large-2 columns">
     <h5 class="show-for-medium-only">Sub Navigation</h5>
     <a href="{path='reviews'}">All Reviews</a>
     {exp:channel:categories class="subNav show-for-medium-up"}
     <a href="{structure:page:url}{category_url_title}" {if freebie_2 == category_url_title}class="currentSubNav"{/if}>{category_name}</a>
     {/exp:channel:categories}
</div>

<div class="large-7 columns">
     <div class="leftCol">
     {embed="includes/breadcrumb"}
     {exp:channel:entries channel="reviews_page" limit="1" disable="category_fields|member_data|pagination"}
     <h2>{title}</h2>
     {reviews_page_content}
     {/exp:channel:entries}

     <!-- If -->
     {if freebie_1 == "reviews" && freebie_2 == ""}
     {exp:channel:entries channel="single_review" limit="10" disable="category_fields|member_data" dynamic="no"}
     <div class="review clearfix">
          <div class="row">
               <div class="medium-8 large-8 columns">
                    <div class="reviewDetails">
                         <p class="main">{title}</p>
                         <p class="sub">{review_subject}</p>
                    </div>
               </div>
               <div class="medium-4 large-4 columns">
                    <a href="{path='reviews'}/{freebie_2}/{url_title}" class="siteButton">Read Review<i class="fa fa-long-arrow-right"></i></a>
               </div>
           </div>     
     </div>
     {/exp:channel:entries}
     {/if}
     <!-- If -->

     <!-- If -->
     {if freebie_1 == "reviews" && freebie_2 != ""}
     {exp:channel:entries channel="single_review" dynamic="no" limit="5" category="{exp:freebie:category_id segment='2'}" parse="inward"}
     <div class="review clearfix">
          <div class="row">
               <div class="medium-8 large-8 columns">
                    <div class="reviewDetails">
                         <p class="main">{title}</p>
                         <p class="sub">{review_subject}</p>
                    </div>
               </div>
               <div class="medium-4 large-4 columns">
                    <a href="{path='reviews'}/{freebie_2}/{url_title}" class="siteButton">Read Review<i class="fa fa-long-arrow-right"></i></a>
               </div>
          </div>     
     </div>
     {/exp:channel:entries}
     {/if}
     <!-- If -->
</div>
  • 1
    is the top level "reviews" a category? Or are all your categories at level 2 (the 'live' slug)? I think I know what you're doing wrong, just not sure what your URL is. Am I reading it correctly as: domainname / reviews (the section name) / review-category / page slug ? – SamC Mar 24 '14 at 16:35
0

Double check your listing channel setting and that they're using the right template. If you update that, you'll need to resave the listing entries to use the new template. Make sure no template groups match your URL segments as it can confuse EE. Also, you should use {page_url} inside your channel tags, the structure variables are for the current page and not to be used inside like that.

| improve this answer | |
  • I will give this a try Travis and come back if it is unsuccessful. Thanks. – user2773 Feb 21 '14 at 9:12

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.