Gossamer Forum
Home : Products : Links 2.0 : Customization :

Stuck Now.. Formating Category List & Links Results..

Quote Reply
Stuck Now.. Formating Category List & Links Results..
I´m a little stuck now.... I formatted the category listings display in one column down the right side if my page.. leaving the space to the left to add pics and text etc.. http://www.visaverde.com/...ty/English/Tenerife/

I do not use templates and the problem i am having is that when i edit the site_html.pl and add text to where I think I want it.. it displays it on the links result page aswell..

View the link above.. it may make more sence.. Any ideas as how to prevent my text being displayed on the links page..

I placed the text "testing.." as an example on the site..

Thanxs in advance..

Last edited by:

JustinS: May 25, 2003, 7:30 AM
Quote Reply
Re: [JustinS] Stuck Now.. Formating Category List & Links Results.. In reply to
Your site looks nice, you've put the script to good use! Need to know more about where you're adding to the file... Can you tell us in what sub, and attach a copy of the file to your post?


Leonard
aka PerlFlunkie
Quote Reply
Re: [JustinS] Stuck Now.. Formating Category List & Links Results.. In reply to
Okay.. The link in the first post will take you to a page that displays a "bit about our selves and the services we offer" (testing... bit) down the lefthand and on the right, the location of the propertywe sell..

when you click through on a location (try the first one), I need the same "bit about our selves and the services we offer" down the lefthand and on the right, the type of the property we sell on this page aswell..

then finally, when the link results are dispayled.. I do not want the "bit about our selves and the services we offer" down the lefthand etc.. caus it messes things all up..



I attach a copy of my site_html.pl http://www.visaverde.com/site_html.txt

hope this makes sence (I am English.. just not very good at it..) Crazy

Justin..
Quote Reply
Re: [JustinS] Stuck Now.. Formating Category List & Links Results.. In reply to
OK, I see where you put it... In sub_category_pages, there's this:

<table border="0" width="720" bgcolor="#FFFFFF" height="300" cellpadding="0">
<tr>
<td width="70%" valign="top"><p align="left">testing.... $links</td>
<td width="30%" valign="top"><p align="left">$category</td>
</tr>
</table>
</center></div>



The stock code looks like this:

if ($category) { $output .= qq~
<h2>Categories:</h2>
$category
~; }
if ($links) {$output .= qq~
<h2>Links:</h2>
$links
~; }
if ($related) {
$output .= qq~
<h2>Related Categories:</h2>
<ul>$related</ul>



So I think a mix of the two is what you need:

<table border="0" width="720" bgcolor="#FFFFFF" height="300" cellpadding="0">
<tr>


if ($category) { $output .= qq~
<td width="70%" valign="top"><p align="left">testing...</td>
<td width="30%" valign="top"><p align="left">$category</td>

~; }


if ($links) {$output .= qq~
<td width="100%" valign="top"><p align="left">$links</td>
~; }

</tr>
</table>
</center></div>


If you want to keep the category listing on the right side, even on the link listing pages, that a simple mod to the code. Let us know if this works...


...just noticed, you have opening 'p' tags, but not closing tags... Actually, they are not required. Normal code is like this:

$build_detailed ?
($output = qq~<ul><li><a class="link" href="$build_detail_url/$rec{$db_key}$build_extension">$rec{'Title'}</a>~) :
($output = qq~<ul><li><a class="link" href="$build_jump_url?$db_key=$rec{$db_key}">$rec{'Title'}</a>~);


if ($rec{'Description'}) { $output .= qq~ <span class="descript">- $rec{'Description'}</span>\n~; }
if ($rec{'isNew'} eq "Yes") { $output .= qq~ <small><sup class="new">new</sup></small>~; }
if ($rec{'isPopular'} eq "Yes") { $output .= qq~ <small><sup class="pop">pop</sup></small>~; }


$output .= qq~ <small class="date">(Added: $rec{'Date'} Hits: $rec{'Hits'} Rating: $rec{'Rating'} Votes: $rec{'Votes'}) <a href="$build_rate_url?ID=$rec{'ID'}">Rate It</a></small>
</ul>


which put links into an unordered list. Yours is putting them into tables:

$output .= qq~
<table border="0" width="100%" cellspacing="0">
<tr>
<td width="100%">$rec{'DescriptEng'}</td>
</tr>
<tr>
<td width="100%"><img src="http://www.visaverde.com/images/bar.gif" width="700" height="1" alt="VisaVerde CS S.L. - Property Sales"></td>
</tr>
<tr>
<td width="100%"></td>
</tr>
</table>



Leonard
aka PerlFlunkie

Last edited by:

PerlFlunkie: May 26, 2003, 12:20 PM
Quote Reply
Re: [JustinS] Stuck Now.. Formating Category List & Links Results.. In reply to
Thanxs for the help..

I copied and pasted the bit in red text to the site_html.pl..

But i get this error when i build it..

"Error including libraries: syntax error at /home/cust4/usr4236/cgi-bin/property/admin/site_html.pl line 444, near ""70%" valign"
BEGIN not safe after errors--compilation aborted at /home/cust4/usr4236/cgi-bin/property/admin/site_html.pl line 454.
Compilation failed in require at nph-build.cgi line 33.
"

i have updated a copy of my site_html.pl http://www.visaverde.com/site_html.txt


your help is appreciated.. Justin
Quote Reply
Re: [JustinS] Stuck Now.. Formating Category List & Links Results.. In reply to
I really had a hack around in here and it now seems to work the way I want it to..

I think what I did was pretty untidy stuff so if I can attach a copy of the now site_html.pl may be so one can perhaps rearange it a bit http://www.visaverde.com/site_html1.txt and smarten it up..

and thanxs to PerlFlunkie.. thanxs v.much... justin
Quote Reply
Re: [JustinS] Stuck Now.. Formating Category List & Links Results.. In reply to
Looks like it's working fine! Your code is OK, except that I like to keep realted sections together, without line breaks:

if ($category or $links) {
$output .= qq~<div align="center"><center><table border="0" width="720" bgcolor="#FFFFFF" height="300" cellpadding="0">
<tr>~;
}

if ($category) {
$output .= qq~<td width="70%" valign="top"><p align="left">testing...</td>
<td width="30%" valign="top"><p align="left">$category</td>~;
}

if ($links) {
$output .= qq~<td width="100%" valign="top"><p align="left">$links</td>~;
}

if ($category or $links) {
$output .= qq~</tr>
</table>
</center></div>~;
}

if ($prev or $next) {
$output .= qq~<p>~;
}

if ($prev) {
$output .= qq~<strong><a href="$prev">Prev $build_links_per_page</a></strong>~;
}

if ($next) {
$output .= qq~<strong><a href="$next">Next $build_links_per_page</a></strong>~;
}

if ($prev or $next) {
$output .= qq~</p>~;
}

if ($footer) {
$output .= qq~<p>$footer</p>~;
}


$output .= qq~
</body>
</html>~;


Leonard
aka PerlFlunkie