forum.coppermine-gallery.net
Support => cpg1.3.x Support => Older/other versions => cpg1.3 Themes/Skins/Templates => Topic started by: CaptainBlue on February 18, 2005, 03:07:15 pm
-
I've added anycontent.php to my page layout and that's fine.
But now I want two tables of information, so I've written it like this:
<?php
starttable("100%", "Latest Trackday Photos");
?>
<tr><td class="tableb" >
<ul>
<li>The day after each Folly trackday, we'll be adding a hyperlink in this section that links to DE Photo's
website from where you'll be able to order prints</li>
</ul>
</td></tr>
<?php
endtable();
?>
<?php
starttable("100%", "Notes");
?>
<tr><td class="tableb" >
<ul>
<li>Registered and logged-in users can send photos as e-cards<br />
- makes a change from cartoons or slick commercial ones!</li>
<li>Your e-card recipient's details will not be used or sold on by the Motorcycle Folly</li>
</ul>
</td></tr>
<?php
endtable();
?>
Now that works OK, but I'd like to add the equivalent of two or three line breaks between the two tables. What's the syntax for this? Any help much appreciated.
-
As a temporary workaround, I've added this code:
<?php echo '-'; ?>
This puts a hyphen in between the two tables - using simply
<?php echo ' '; ?>
did nothing.
-
Just use plain html:
<?php
starttable("100%", "Latest Trackday Photos");
?>
<tr><td class="tableb" >
<ul>
<li>The day after each Folly trackday, we'll be adding a hyperlink in this section that links to DE Photo's
website from where you'll be able to order prints</li>
</ul>
</td></tr>
<?php
endtable();
?>
<br /> <br /> <br />
<?php
starttable("100%", "Notes");
?>
<tr><td class="tableb" >
<ul>
<li>Registered and logged-in users can send photos as e-cards<br />
- makes a change from cartoons or slick commercial ones!</li>
<li>Your e-card recipient's details will not be used or sold on by the Motorcycle Folly</li>
</ul>
</td></tr>
<?php
endtable();
?>
Using PHP would be the very same thing: just make it output the line breaks, like this[quote]<?php
starttable("100%", "Latest Trackday Photos");
?>
<tr><td class="tableb" >
<ul>
<li>The day after each Folly trackday, we'll be adding a hyperlink in this section that links to DE Photo's
website from where you'll be able to order prints</li>
</ul>
</td></tr>
<?php
endtable();
print '<br /> <br /> <br />';
starttable("100%", "Notes");
?>
<tr><td class="tableb" >
<ul>
<li>Registered and logged-in users can send photos as e-cards<br />
- makes a change from cartoons or slick commercial ones!</li>
<li>Your e-card recipient's details will not be used or sold on by the Motorcycle Folly</li>
</ul>
</td></tr>
<?php
endtable();
?>
You have to understand how PHP works: just like in html, where commands between < and > are used to delimit page content from tags, PHP is being switched on and off using <?php and ?>. Recommended reading to get you started: http://www.php.net/manual/en/language.basic-syntax.php#language.basic-syntax.phpmode
Joachim[/quote]
-
Thanks for that: I'd tried adding some line breaks but they'd failed for me. The PHP option worked, however, with just one line break being needed so the code now goes like this:
<?php
starttable("100%", "Latest Trackday Photos");
?>
<tr><td class="tableb" >
<ul>
<li>The day after each Folly trackday, we'll be adding a hyperlink in this section that links to DE Photo's
website from where you'll be able to order prints</li>
</ul>
</td></tr>
<?php
endtable();
print ' <br />';
starttable("100%", "Notes");
?>
<tr><td class="tableb" >
<ul>
<li>Registered and logged-in users can send photos as e-cards<br />
- makes a change from cartoons or slick commercial ones!</li>
<li>Your e-card recipient's details will not be used or sold on by the Motorcycle Folly</li>
</ul>
</td></tr>
<?php
endtable();
?>