We use cookies to improve your experience. No personal information is gathered and we don't serve ads. Cookies Policy.

ExpressionEngine Logo ExpressionEngine
Features Pricing Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University
Log In or Sign Up
Log In Sign Up
ExpressionEngine Logo
Features Pro new Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University Blog
  • Home
  • Forums

Broken template

How Do I?

lando's avatar
lando
5 posts
8 years ago
lando's avatar lando

Hi all,

I have a problem with URL title and template: when I display a single entry, the template assigned to that entry is broken, basically a chunk of the code between channel entries tag is not displaying.

My “template_group/template” system is “people/partners” and the single entry is in “partner” template

Here’s my “partners” template code:

{embed="includes/header" page_title="Partners"}
{embed="includes/nav" loc="people"}

<!-- header -->
    {exp:channel:entries channel="partners_landing"}
    <div id="carousel-example-generic" class="carousel slide" data-ride="carousel">
      <!-- Wrapper for slides -->
      <div class="carousel-inner" role="listbox">
        <div class="item active">
          {hero_image}
          <div class="carousel-caption">
            <h1>{title}</h1>
          </div>
        </div>
      </div>
    </div>

<!-- end of header -->
      
<!-- main content -->

      <div class="container">
          <div class="row">
              <div class="col-lg-12 col-md-12 col-sm-12">
                <h2>{intro_text}</h2>
                {main_content}
                {/exp:channel:entries}
    Our Partners
    <ul>
                  {exp:channel:entries channel="people" category="13" orderby="url_title" sort="asc" dynamic="yes"}
                      <li><a href="http://{title_permalink=people/partner}">{title}</a></li>
                  {/exp:channel:entries}
    </ul>
              </div>
          </div>
      </div>
      
<!-- end of main content -->
{embed="includes/people_sections"}
{embed="includes/footer"}

Here’s my “partner” template code:

{embed="includes/header" page_title="Partners"}
{embed="includes/nav" loc="people"}

<!-- header -->
    {exp:channel:entries channel="partners_landing"}
    <div id="carousel-example-generic" class="carousel slide" data-ride="carousel">
      <!-- Wrapper for slides -->
      <div class="carousel-inner" role="listbox">
        <div class="item active">
          {hero_image}
          <div class="carousel-caption">
            <h1>{title}</h1>
          </div>
        </div>
      </div>
    </div>
 {/exp:channel:entries}
<!-- end of header -->
      
<!-- main content -->
 {exp:channel:entries channel="people"}
      <div class="container">
          <div class="row">
              <div class="col-lg-9 col-md-9 col-sm-12">
                <h2>{title}</h2>
                <h3>Expertise</h3>
                {team_member_content}
    <h3>Testimonials</h3>
    {team_member_testimonials}
              </div>
              <div class="col-lg-3 col-md-3 col-sm-12">
               {team_member_image}
              </div>
          </div>
      </div>
 {/exp:channel:entries}      
<!-- end of main content -->
{embed="includes/people_sections"}
{embed="includes/footer"}

The <!– header –> code chunk disappears from the “partner” template when the last segment is showing in the URL but if the URL is only “people/partner” the chunk appears correctly but I do need the last segment to show in the URL.

I tried to add {url_title} and other solutions but no luck.

Any suggestions very appreciated and thanks in advance!

       

Reply

Sign In To Reply

ExpressionEngine Home Features Pro Contact Version Support
Learn Docs University Forums
Resources Support Add-Ons Partners Blog
Privacy Terms Trademark Use License

Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.