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.

Headers for table

February 20, 2012 7:00am

Subscribe [3]
  • #1 / Feb 20, 2012 7:00am

    roland.hodson

    1 posts

    Hello

    I am trying to create a price list using a categories in a table, the table has columns for elements of a product.

    the headings just need to appear at the top of the list of products and NOT to iterate for each category

    I want it to look like this page

    http://www.ukbmb.com/shop/page/pricelist

    this page is done with jshop (cart software0

    need to be able to recreate in ee.


    Thanking any one in anticipation


    Roland

  • #2 / Feb 20, 2012 7:16am

    mark186282

    290 posts

    Assuming your products are in a channel called “products”:

    And this page is located at (for category ID=4 ):

    yoursite.com/products/category/4

    <html>
    <body>
     {exp:channel:categories category_group='{segment_3}'}
        {category_name}
     {/exp:channel:categories}
     <table>
     <thead>
     <tr>
      <th>Product Name</th>
      <th><!-- put all your column headers here --></th>
     </tr>
     </thead>
     <tbody>
      {exp:channel:entries channel='products' category='{segment_3}'}
      <tr>
       <td>{title}</td>
       <td>{<!-- other custom fields for that product… price, description, etc…--> }</td>
      </tr>
      {/exp:channel:entries}
     </tbody>
     </table>
    </body>
    </html>

    is this what you are looking for?

  • #3 / Feb 20, 2012 8:16am

    roland.hodson

    1 posts

    Thankyou very much

    mark186282


    This gets me almost there but leaves all the categories titles at the top - like so

      Briggs
          Briggs Kit 1
          Briggs Kit 2
          Briggs Kit 3
          Briggs Kit 4
          Briggs Kit 5
          Briggs Kit 6

    Product Name Kit Description Truck_voltage}  Kit_price Fit_at_cannock STD_wiring_charge converter
    Kit 4 B Weatherguard (Front, Top and Hinged Opening Rear Screen) inc. Front & Rear Washer/Wiper Kit NO PVC Sides 12 volt £680.00 £85.00 £142.00
    Kit 4 A Weatherguard (Front, Top and Hinged Opening Rear Screen) inc. Front & Rear Washer/Wiper Kit WITH PVC Sides   £788.00 £85.00 £142.00
    Kit 3 A Travis Perkins Spec (Front and Top Screen) inc. Front Wiper/Washer Kit   £507.00 £85.00 £116.00
    Kit 2 A Travis Perkins Spec (Front and Top Screen) inc. Front W/Washer Kit 12 volt £453.00 £85.00 £116.00
    Kit 1 B Weatherguard (Front, Top and Rear Screen) inc.Front & Rear Wiper/Washer Kit NO PVC Sides 12 volt £640.00 £85.00 £142.00
    Kit 1 A Weatherguard (Front, Top and Rear Screen) inc.Front & Rear Wiper/Washer Kit WITH PVC Sides 12 volt £749.00 £85.00 £142.00


    the price list needs to be listed with the products in their catagories


    Many thank for you help.

    Roland

  • #4 / Feb 21, 2012 1:30pm

    Shane Eckert

    7174 posts

    Hi Roland,

    You will want to wrap this in css or html, but let me know if this gets you closer to what you are looking for.

    {exp:channel:category_heading channel="products"}
      <h3>Category: {category_name}</h3>
    <p>  {if category_description !=""}{category_description}{/if}<br />
      {/exp:channel:category_heading}<br />
      {exp:channel:entries channel="products" category_group='{segment_3}'}<br />
          </p><h3><a href="http://{url_title_path=%27site/views%27}" class="products">{title}</a></h3>
    <p>      {channel_field_with_content}<br />
      {/exp:channel:entries}

    This should results in:

    Category Header 1
    Channel Header with Link
    Channel Content

    Category Header 2
    Channel Header with Link
    Channel Content

    And so on ....


    Cheers,

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

ExpressionEngine News!

#eecms, #events, #releases