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.

got stuck with jQuery UI Tabs and the implementation of EE

July 13, 2010 6:30am

Subscribe [3]
  • #1 / Jul 13, 2010 6:30am

    moreofallpls

    12 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:

    <!-- BEGIN: Tabs 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}">
              <!-- BEGIN: Cart Items -->
              {exp:weblog:entries weblog="products" limit="10"}
                  
                <div id="products_description">
                  <h4>{title}</h4>
    <p>              {product_description}<br />
                  <br />
                  {exp:cartthrob:add_to_cart_form <br />
                    entry_id="{entry_id}" <br />
                    return="cart/index"<br />
                    class="yform"<br />
                  }<br />
                  <br />
                    <div class="price"><br />
                      <b>CHF {product_price}</b><br />
                    </div><br />
                    <br />
                    <div class="quantity"><br />
                      Menge: <input type="text" name="quantity" size="1" value="1" /><br />
                    </div><br />
              <br />
                    <div class="type-button"><br />
                      <input type="submit" value="in Warenkorb" id="submit" name="submit" /><br />
                    </div><br />
                    <br />
                  {/exp:cartthrob:add_to_cart_form}<br />
                <div id="clear"></div><br />
                </div><br />
                <br />
              {/exp:weblog:entries}<br />
              <!-- END: Cart Items --><br />
            </div><br />
            {/exp:weblog:categories}<br />
          </div><br />
          <!-- END: Tabs 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.

  • #2 / Jul 13, 2010 4:12pm

    Ingmar

    29245 posts

    Moving to CodeShare Corner.

  • #3 / Jul 13, 2010 6:29pm

    Boyink!

    5011 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}">
              <!-- BEGIN: Cart Items -->
              {exp:weblog:entries weblog="products" limit="10" category_id="{category_id}"}
.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases