17488 Posts in 4473 Topics by 1978 members
|
Page:
1
|
Go to End | |
| Author | Topic: | 1775 Views |
-
How I can show content in two columns using a template?

22 May 2008 at 7:19pm Last edited: 22 May 2008 7:21pm
Please help me
How can I show content in two columns using a template?
I need 2 collumn. how I mast insert <tr> in next code ?<table id="ProdList">
<% control Children %>
<td>
<div class="newsDateTitle"><a href="$Link" title="Read more on "{$Title}"">$Title</a></div>
<div class="newsDateTitle">$Year</div>
<div class="newsDateTitle">$Color</div>
</td>
<% end_control %>
</table> -
Re: How I can show content in two columns using a template?

22 May 2008 at 7:55pm
<table>
<tr>
<td>line1 col1</td>
<td>line1 col2</td>
</tr>
<tr>
<td>line2 col1</td>
<td>line2 col2</td>
</tr>
</table>well.. that's the code for a table... so let's imagine that you want a news list on the left and the news details on the right, you could have
<table id="ProdList">
<% control Children %>
<tr>
<td><div class="newsDateTitle"><a href="$Link" title="Read more on "{$Title}"">$Title</a></div>
<div class="newsDateTitle">$Year</div>
<div class="newsDateTitle">$Color</div> </td>
</tr>
<tr>
<td>$Content</td>
</tr>
<% end_control %>
</table>is that what you wanted to do?
-
Re: How I can show content in two columns using a template?

22 May 2008 at 8:08pm Last edited: 22 May 2008 8:12pm
no not THIS ((
in php I write
<? $i=0; ?>
<table id="ProdList">
<% control Children %>
<? if ($i==0) echo "<tr>";
?>
<td>
<div class="newsDateTitle"><a href="$Link" title="Read more on "{$Title}"">$Title</a></div>
<div class="newsDateTitle">$Year</div>
<div class="newsDateTitle">$Color</div>
</td>
<?
if ($i==1) echo "</tr>";
if ($i==0){ $i++; }else{ $i=0;}
?>
<% end_control %>
</table>in HTML I wont get next rezult
<table id="ProdList"><tr>
<td>
<div class="newsDateTitle"><a href="$Link" title="Read more on "{$Title}"">$Title</a></div>
<div class="newsDateTitle">$Year</div>
<div class="newsDateTitle">$Color</div>
</td><td>
<div class="newsDateTitle"><a href="$Link" title="Read more on "{$Title}"">$Title</a></div>
<div class="newsDateTitle">$Year</div>
<div class="newsDateTitle">$Color</div>
</td></tr>
<tr>
<td>
<div class="newsDateTitle"><a href="$Link" title="Read more on "{$Title}"">$Title</a></div>
<div class="newsDateTitle">$Year</div>
<div class="newsDateTitle">$Color</div>
</td><td>
<div class="newsDateTitle"><a href="$Link" title="Read more on "{$Title}"">$Title</a></div>
<div class="newsDateTitle">$Year</div>
<div class="newsDateTitle">$Color</div>
</td>
</tr></table>
-
Re: How I can show content in two columns using a template?

22 May 2008 at 8:10pm
Tables?!?!? thats not a solution
If you want 2 columns whats stopping you doing
<div class="product">
Blah
</div><div class="product">
Blah
</div>Then just define a width on .product like (50%) and float it left.
-
Re: How I can show content in two columns using a template?

22 May 2008 at 8:21pm
I do not know how to use php code in my .ss file
How I can make this
<% control Children %>
<? if ($i==0) echo "<tr>";
?> -
Re: How I can show content in two columns using a template?

22 May 2008 at 8:24pm
You cant use PHP in ss templates. You can use $EvenOdd if you only need two.. I think it would be like
<td>Blah</td>
<% if EvenOdd = Even %>
</tr>
<% end_if %> -
Re: How I can show content in two columns using a template?

23 May 2008 at 2:11am
willr, thank you very much
| 1775 Views | ||
|
Page:
1
|
Go to Top |


