CodeCharge Studio
search Register Login  

Visual PHP Web Development

Visually Create Internationalized Web Applications, Web Reports, Calendars, and more.
CodeCharge.com

YesSoftware Forums -> CodeCharge Studio -> PHP

 [solved] 2 column catalogue layout

Print topic Send  topic

Author Message
damian

Posts: 838
Posted: 05/20/2010, 6:09 AM

hi guys,

i want to display a catalogue something like this:

image
product
dimensions weight price code
42x50x50 4kg bw4250
30x42x42 3kg bw3042
24x30x30 2.4kg bw2430

thats easy enough....

but now i need to display in 2 columns.... i just cant work out how I might do this.... i have tried using altrows and gallery.
problem is the above data is in a table within the <!-- BEGIN Row --> and <!-- END Row --> tags... I need the table layout for each item....
any suggestions?

regards
damian
_________________
if you found this post useful take the time to help someone else.... :)
View profile  Send private message
mamboBROWN


Posts: 1713
Posted: 05/20/2010, 4:25 PM

damian,
Have you thought about joining two columns into 1?
View profile  Send private message
damian

Posts: 838
Posted: 05/20/2010, 5:13 PM

what do you mean by that?

following is layout code and below that what it actually looks like...

  
    <!-- BEGIN Grid p1_range -->  
    <table>  
      <tr>  
        <td>    
          <table>  
            <tr>  
              <th colspan="2" align="right">{range_name}</th>  
            </tr>  
   
            <tr class="myRange">  
  
              <td>  
<img id="p1_rangerange_logo_{p1_range:rowNumber}" src="images/products/{range_logo}" />  
</td>   
              <td bgcolor="{range_colour}"><font color="#ffffff">{range_desc}</font></td>  
            </tr>  
   
            <tr>  
              <td colspan="2"> </td>  
            </tr>  
          </table>  
        </td>  
      </tr>  
  
    </table>  
above is the product range
below is the product list with a single item... formatting not done yet :)

  
    <!-- BEGIN Row -->  
    <table class="myP1">  
      <tr>  
        <td colspan="4" align="center">  
<img id="p1_rangep1_image_{p1_range:rowNumber}" alt="" src="images/products/{p1_image}" />  
 </td>  
      </tr>  
   
      <tr>  
        <td colspan="4" align="middle"> {p1_name}</td>  
  
      </tr>  
   
      <tr>  
        <td colspan="4" align="center">{p1_desc} </td>  
      </tr>  
   
      <tr>  
        <td>{p1_col1} </td>   
        <td>{p1_col2} </td>   
        <td>{p1_col3} </td>   
        <td>{p1_col4} </td>  
  
      </tr>  
   
      <tr>  
        <td>{p1_col1_value} </td>   
        <td>{p1_col2_value} </td>   
        <td>{p1_col3_value} </td>   
        <td>{p1_col4_value} </td>  
      </tr>  
   
   
    </table>  
    <!-- END Row -->  
  
    <!-- END Grid p1_range -->  

i want to have products in 2 columns and multiple rows....



so second product would be n the green square instead of the row below...

_________________
if you found this post useful take the time to help someone else.... :)
View profile  Send private message
mamboBROWN


Posts: 1713
Posted: 05/21/2010, 5:49 AM

OOOOHHHHHH,
Now I understand. Here is one suggestion. Using the gallery you can generate the appropriate code for each item and place it within the cell (think stored procedure where you pass it a variable-item name-and it returns generated code back to you). The generated code would include the image and a table of the corresponding detail. Let me know if what I said makes any since.
View profile  Send private message
damian

Posts: 838
Posted: 05/21/2010, 7:35 AM

yeah i was working on gallery and messed something up

i pretty much have it working now and just need to finish the formatting...



posted below is the code...

this is outside the ROW and is only displayed once...

  
      <!-- BEGIN Grid p1_range -->  
  
      <table align="center" width="720px">  
        <tr>  
          <th colspan="2" align="right">{range_name} </th>  
        </tr>  
   
        <tr class="myRange">  
          <td>  
<img id="p1_rangerange_logo_{p1_range:rowNumber}" alt="" src="images/products/{range_logo}" />  
 </td>   
          <td bgcolor="{range_colour}"><font color="#ffffff">{range_desc}</font> </td>  
        </tr>  
  
   
        <tr>  
          <td colspan="2" align="right"> </td>  
        </tr>  
      </table>  
  

this is the repeating code... eg ROW using the GALLERY PANEL to display 2 columns of products
the table had to be fully inside the BEGIN PanelRowComponents...

  
  
      <table>  
        <!-- BEGIN Row -->  
        <!-- BEGIN Panel RowOpenTag -->  
        <tr>  
          <!-- END Panel RowOpenTag -->  
  
          <td>  
            <!-- BEGIN Panel RowComponents -->  
            <table class="myP1" width="360" align="center">  
              <tr>  
                <td colspan="4">  
<img id="p1_rangeRowComponentsp1_image_{p1_range:rowNumber}" src="images/products/{p1_image}" />  
</td>  
              </tr>  
   
              <tr>  
                <th colspan="4"><font color="{range_color}">{p1_name}</font></th>  
  
              </tr>  
   
              <tr>  
                <td colspan="4">{p1_desc}</td>  
              </tr>  
   
              <tr>  
                <td>{p1_col1}</td>   
                <td>{p1_col2}</td>   
                <td>{p1_col3}</td>   
                <td>{p1_col4}</td>  
  
              </tr>  
   
              <tr>  
                <td>{p1_col1_value}</td>   
                <td>{p1_col2_value}</td>   
                <td>{p1_col3_value}</td>   
                <td>{p1_col4_value}</td>  
              </tr>  
  
   
              <tr>  
                <td colspan="4"> </td>  
              </tr>  
            </table>  
            <!-- END Panel RowComponents --> </td>   
          <!-- BEGIN Panel RowCloseTag -->  
        </tr>  
  
 <!-- END Panel RowCloseTag --><!-- END Row -->  
        <!-- BEGIN NoRecords -->  
        <tr>  
          <td colspan="{p1_range:numberOfColumns}">No records</td>  
        </tr>  
        <!-- END NoRecords -->  
      </table>  
      <!-- END Grid p1_range --><br />  
  



_________________
if you found this post useful take the time to help someone else.... :)
View profile  Send private message
mamboBROWN


Posts: 1713
Posted: 05/21/2010, 12:14 PM

damian,
I'm glad you figured it out (I actually had a few more suggetions but I guess you don't need them ;-) ). Now that you have a solution do you mind adding [SOLVED] or [RESOLVED] to the thread title. Thanks.
View profile  Send private message

Add new topic Subscribe to topic   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

Web Database

Join thousands of Web developers who build Web applications with minimal coding.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.