ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Non Dynamic Channel Entry Not showing up on Category Pages

June 12, 2012 1:08pm

Subscribe [7]
  • #1 / Jun 12, 2012 1:08pm

    primeinc

    11 posts

    Hey this is probably me being stupid but I cant figure out whats causing the problem.

    I have some category pages that end in the url segment “FishingReports/Report/C4”.

    In each template I have an embedded header with a channel entry that allows the client to update store hours on every page.

    The channel entry looks like this..

    {exp:channel:entries channel="store_info" limit="1" dynamic="no"}
     <li> {street_address} Bozeman MT </li>
     <li> {406_phone_number}  ∗ {1800_number} </li>
     <li> Store Hours:    Mon-Sat: {monday_saturday_hours}     Sun: {sunday_hours}  </li> 
    {/exp:channel:entries}

    As you can see I have dynamic=“no” set and it works great on single entry permalinks but I dont know what to do for category pages.

    Thanks for you help in advance.

    Ben
    Prime Inc

  • #2 / Jun 12, 2012 2:39pm

    primeinc

    11 posts

    I am running EE version 2.5.0 just to clarify a little more…

  • #3 / Jun 13, 2012 1:31pm

    Dan Decker

    7338 posts

    Hi primeinc,

    Just so I’m clear, this is *not* working properly on your category templates?

    There isn’t anything out of line in the code you’ve shown. Can you share the template that embeds this above code?

    I need to see the overall context just to make sure there isn’t anything else that could influence this.

    Cheers,

  • #4 / Jun 14, 2012 8:43am

    clearbytes

    4 posts

    I’m also getting this problem.

    This is the template .news-header:

    {exp:channel:entries channel="content" entry_id="26" dynamic="no"}  
       {intro_textarea}
      {/exp:channel:entries}

    This is the embed code:

    {embed="beautygurus/.news-header"}


    Any ideas?

    Thanks

    Simon

  • #5 / Jun 14, 2012 11:51am

    primeinc

    11 posts

    Yes I am confirming that it is not working.  I have tried to post the template but it is too big to fit in a forum post and I get “file could not written to disk” errors when trying to upload an html file fo the template.

    The basic structure is this

    {embed="Templates/.PageSource" pageTitle="Fishing Reports"}
    
    <body>
    
    {embed="Templates/.InsideHeaderNav" sectionTitle="Fishing Reports"}
      
      
    <div id ="mainContent">
    <div id="mainContentContainer">
     
     
     <div id="twoThirdColumn">
      {exp:channel:entries channel="fishing_report" limit="1"}
       <!-- Shows most recent entry for that category by entry date and has a ton of conditional variables based on the category shown in segment_3} -->
      {/exp:channel:entries}
     </div>
     
     <div id="oneThirdColumn">
     
      <span>
       {exp:channel:entries channel="fishing_report" limit="1"}
        <!-- Shows products related to the individual report -->
       {/exp:channel:entries}
      </span>
      
      <h2> Fishing Reports </h2>
    
    <p>  <hr ><br />
      <br />
      <a href="http://feeds.feedburner.com/MTTroutfitterFishingReports" target="_blank" rel="noopener">_   <a href="http://184.168.80.129/~troutfit/images/theme/rssLink.png">http://184.168.80.129/~troutfit/images/theme/rssLink.png</a>_  </a></p>
    
    <p>  <br />
       Click on a river to view  <br />
     individual river reports.<br />
      </p>
    
    <p>  <ul class="RiversNav"><br />
      <br />
       {exp:channel:categories channel="fishing_report" style="linear"}<br />
        <!-- Just a dynamic List of the Categories --><br />
       {/exp:channel:categories}</p>
    
    <p> </div><br />
     <br />
     <br />
    </div><br />
    </div><br />
           <br />
    {embed="Templates/.Footer"}<br />
      <br />
    </body></p>
    
    <p><br />
    </html>


    The channel entry that is not being shown is located in the

    {embed="Templates/.PageSource" pageTitle="Fishing Reports"}

    which looks like this

    <div id="header">
    
     <div id="headerContainer">
     
      <a href="http://{site_url}"></a>
      
      <ul id="storeInfo">
       
       {exp:channel:entries channel="store_info" limit="1" dynamic="no"}
          <li> {street_address} Bozeman MT </li>
          <li> {406_phone_number}  ∗ {1800_number} </li>
          <li> Store Hours:    Mon-Sat: {monday_saturday_hours}     Sun: {sunday_hours}  </li> 
       {/exp:channel:entries}
       
               
      </ul>
      
      <div id="pagesearch">
       <div class="searchform">
        {exp:search:simple_form channel="blog|products|class|guide_trip|fishing_report" result_page="Search"}
         <input type="submit" class="formSearchSubmit"/>
         <input type="text" name="keywords" value="" class="formSearchInput" />
        {/exp:search:simple_form}
       </div>
      </div>
      
      
      {globalNav}
      
      <div class="clear"></div>
      
     </div>
     
    </div>
      
        
    <div id="homeSlideText">
     
     <div id="bannerContainer">
     
      <h1> {embed:sectionTitle} </h1> 
     
     </div>
    
    </div>
  • #6 / Jun 14, 2012 12:21pm

    Kurt Deutscher

    827 posts

    Off the top of my head:

    1.  {exp:channel:entries channel=“store_info” limit=“1” dynamic=“no”} Add a category=”” parameter so EE knows which store’s info to use when it’s on a category. With dynamic=“no” it’s totally blind to the URL, so you’ll need to give it more information about where the info is (unless you have a whole channel with only one entry).

    2. A couple of years back, there was a bug where the “limit” paramater would count expired entries, but the channel:entries tag wouldn’t display them. So if you had 2 entries, and the first was expired, you would get nothing in the tag. I believe this bugs been fixed, but you might try moving up the limit to 10 or something just to rule out that this old bug hasn’t come back.

  • #7 / Jun 14, 2012 12:30pm

    primeinc

    11 posts

    Thanks Kurt,

    sadly both of these are a no go…

    Also I missed copied the template the code that the nav is embedded in.  It is actually the

    {embed=“Templates/.InsideHeaderNav” sectionTitle=“Fishing Reports”}

    Although that shouldn’t make much of a difference other then to show that I’m not stupid putting body code in the <head>.

  • #8 / Jun 15, 2012 3:44pm

    primeinc

    11 posts

    Any additional thoughts on this guys?

  • #9 / Jun 15, 2012 4:34pm

    Dan Decker

    7338 posts

    Hi primeinc,

    I feel your frustration on this. Can I get you to test the embedded template on it’s own?

    Can you make a new template and plug in your embed code:

    <div id="header">
    
     <div id="headerContainer">
     
      <a href="http://{site_url}"></a>
      
      <ul id="storeInfo">
       
       {exp:channel:entries channel="store_info" dynamic="no"}
          <li> {street_address} Bozeman MT </li>
          <li> {406_phone_number}  ∗ {1800_number} </li>
          <li> Store Hours:    Mon-Sat: {monday_saturday_hours}     Sun: {sunday_hours}  </li> 
       {/exp:channel:entries}
       
               
      </ul>
      
      <div id="pagesearch">
       <div class="searchform">
        {exp:search:simple_form channel="blog|products|class|guide_trip|fishing_report" result_page="Search"}
         <input type="submit" class="formSearchSubmit"/>
         <input type="text" name="keywords" value="" class="formSearchInput" />
        {/exp:search:simple_form}
       </div>
      </div>
      
      
      {globalNav}
      
      <div class="clear"></div>
      
     </div>
     
    </div>
      
        
    <div id="homeSlideText">
     
     <div id="bannerContainer">
     
      <h1> {!-- embed:sectionTitle --} </h1> 
     
     </div>
    
    </div>

    With that, we have no limit or embed variable. Save this template and access it in the browser.

    Does it return any results at all?

    Cheers,

  • #10 / Jun 17, 2012 7:58pm

    Tyas

    35 posts

    Hi Dan,

    I have the same problem ini my 2.5.0. My channel entries is not working ONLY in categories page like http://domain.com/v1/pk/C32/. The same channel entry tag is working in other pages except categories. this is the tag.

    {exp:channel:entries channel="store_simple_entry" entry_id="294" dynamic="no"}
     {keterangan_detail}
    {/exp:channel:entries}
  • #11 / Jun 18, 2012 5:18pm

    Dan Decker

    7338 posts

    Hi Tyas,

    Thank you for your question!

    Can you show the whole template for “pk”?

    As a test, since you are specifying the entry_id= parameter, let’s take out the dynamic=“no” parameter and see what we get.

    Cheers,

  • #12 / Jun 18, 2012 10:16pm

    Tyas

    35 posts

    I just upgrade to 2.5.2, already take out the dynamic=no but stil no luck. This is the pk template from domain.com/v1/pk/C123

    {preload_replace:template_group="v1"}
    {preload_replace:template="pk"}
     
    {embed="{template_group}/_store_header" template_group="{template_group}" template="{template}"}
    
    <div class="span-24 latar_normal">
     <div class="kolom_kiri">
      {embed="v1_blok/blok_kategori"}
      {embed="v1_blok/blok_merek"} {!-- contain channel entries and not working properly --}
      {embed="v1_blok/blok_fb_pages"}
      {embed="v1_blok/blog_adsense"}
     </div>
    
     <div class="kolom_tengah">
    </div>
    
     {exp:channel:entries channel="products" limit="30" dynamic="yes" dynamic_parameters="orderby|limit|sort"}     
      <div class="box_grid_produk">
    
       <div>
       {if product_images}
        {exp:channel_images:images entry_id="{entry_id}" limit="1" cover_only="yes"}
         <a href="http://{url_title_path={template_group}/pi}">{image:url:small}</a>
        {/exp:channel_images:images}
       {/if}
    
          
       </div>
       <div>
        <div>
    
         <a href="http://{url_title_path={template_group}/pi}">{related_entries id="brand_manufacture"}{title}{/related_entries} {title}</a>
        </div>
        <div>
           {exp:rating:stats entry_id="{entry_id}" precision="1"}
         {stars_overall_avg} ({overall_avg}/5.0)
           {/exp:rating:stats}
        </div>
    
        <div>
        {if price_list!=""}<small>List <strike>{price_list}</strike></small>{/if}
        <h4>
        {if sale_price==""}
         <strong>{product_price}</strong>
        {if:else}
         <strong><strike>{product_price}</strike></strong>
    
         <strong>{sale_price}</strong>
        {/if}
        </h4>
    <p>    </div><br />
        <div class="quiet">{related_entries id="keterangan_produk_khusus"}{title}{/related_entries}</div><br />
       </div><br />
       <div><br />
        {exp:cartthrob:add_to_cart_form <br />
         entry_id="{entry_id}" <br />
         no_tax="{no_tax}"<br />
         no_shipping = "{no_shipping}"<br />
         return="{template_group}/cv"} <br />
           <br />
         <input type="submit" class="button orange" value="+ Add to Cart" /><br />
           <br />
        {/exp:cartthrob:add_to_cart_form}<br />
       </div><br />
      </div><br />
     {/exp:channel:entries}</p>
    
    
    
    <p><br />
     </div></p>
    
    <p> <div><br />
     {!-- KETERANGAN PRODUK UMUM --}<br />
      {exp:channel:entries channel="store_simple_entry" entry_id="294"}<br />
       {keterangan_detail}<br />
      {/exp:channel:entries}<br />
     </div></p>
    
    <p></div></p>
    
    <p></div> {!-- end of container --}</p>
    
    <p><br />
    {embed="{template_group}/_store_footer" template_group="{template_group}" template="{template}"}

    {embed="v1_blok/blok_merek"}—> this contain channel entry and not working properly either.

    Just info I have another page with 2 embed channel entries like this and working fine.

  • #13 / Jun 20, 2012 3:37pm

    Dan Decker

    7338 posts

    Hi Tyas,

    Can you try this for me? Since we are on a category template, we want ExpressionEngine to ignore category information on this one channel entries tag. We can tell it that with the relaxed_categories=“yes” parameter.

    {exp:channel:entries channel="store_simple_entry" entry_id="294" relaxed_categories="yes"}
     {keterangan_detail}
    {/exp:channel:entries}

    Let me know your result!

    Cheers,

  • #14 / Jun 20, 2012 7:15pm

    Tyas

    35 posts

    still no luck with relaxed_categories=“yes” Dan.

    How about primeinc, is he already solved the problem?

  • #15 / Jun 22, 2012 10:30pm

    Tyas

    35 posts

    I am getting frustated on this, i try simple template in URL category: v1/pk/C8/cat_url with relaxed_categories=“yes” and stil not working. Is it a bug or wrong template?

    {exp:channel:entries channel="products" limit="20" dynamic="yes" pagination="bottom"}     
     <li>{title}</li>
     {paginate}
             Page {current_page} of {total_pages} pages {pagination_links}
     {/paginate}
    {/exp:channel:entries}
    
    
    {exp:channel:entries channel="store_simple_entry" entry_id="294" relaxed_categories="yes"}
     {keterangan_detail}
    {/exp:channel:entries}

    BUT it’s working on v1/pk/category/cat_url
    with setting
    1. Use Category URL Titles In Links? YES
    2. Category URL indicator = category

    The question?
    Should i change all the category url method? since i already submit the category url to google and almost finish all my template, OR other solution using standard numeric indicator /C../

    Please advice.

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases