EllisLab text mark
Advanced Search
     
got stuck with jQuery UI Tabs and the implementation of EE
Posted: 13 July 2010 06:30 AM   [ Ignore ]
Joined: 2009-06-13
20 posts

Hello all

Would be great if somebody could help me!

I’d like to have Tabs with category entries automatically generated and to have them filled with the specific category weblog content on my site.

This is for the CartThrob webshop. So I can assign different categories to my products weblogs and show them in the different tabs ...

Here’s what I’ve done already:

<!-- BEGINTabs Block-->
      <
div id="tabs">
        <
ul>
          
{exp:weblog:categories weblog="products" style="linear"}
            
<li><a href="#tabs-{count}">{category_name}</a></li>
          
{/exp:weblog:categories}
        
</ul>
        
        
{exp:weblog:categories weblog="products" style="linear"}
        
<div id="tabs-{count}">
          <!-- 
BEGINCart Items -->
          
{exp:weblog:entries weblog="products" limit="10"}
              
            
<div id="products_description">
              <
h4>{title}</h4>
              <
p>{product_description}</p>
              
              
{exp:cartthrob:add_to_cart_form 
                entry_id
="{entry_id}" 
                
return="cart/index"
                
class="yform"
              
}
              
                
<div class="price">
                  <
b>CHF {product_price}</b>
                </
div>
                
                <
div class="quantity">
                  
Menge: <input type="text" name="quantity" size="1" value="1" />
                </
div>
          
                <
div class="type-button">
                  <
input type="submit" value="in Warenkorb" id="submit" name="submit" />
                </
div>
                
              
{/exp:cartthrob:add_to_cart_form}
            
<div id="clear"></div>
            </
div>
            
          
{/exp:weblog:entries}
          
<!-- ENDCart Items -->
        </
div>
        
{/exp:weblog:categories}
      
</div>
      <!-- 
ENDTabs Block--> 

how is it possible to have only shown the proper weblog entries in the proper tab according to the right category?

Somehow it must work with the “category=“2”“-parameter from the {exp:weblog:entries}-tag, but how do I make them work together?

Thank you in advance for your anser.

m.

 
Posted: 13 July 2010 04:12 PM   [ Ignore ]   [ # 1 ]   [ Rating: 0 ]
Avatar
Joined: 2004-05-15
29075 posts

Moving to CodeShare Corner.

 
Posted: 13 July 2010 06:29 PM   [ Ignore ]   [ # 2 ]   [ Rating: 0 ]
Avatar
Joined: 2002-12-06
4240 posts

For starters I’d try limiting the inner loop based on the category id from the outer:

{exp:weblog:categories weblog="products" style="linear"}
        
<div id="tabs-{count}">
          <!-- 
BEGINCart Items -->
          
{exp:weblog:entries weblog="products" limit="10" category_id="{category_id}"
 Signature 

Get the missing EE2 owner’s manual - a complete guide to building an EE2 site.  It’s available in PDF or print.