How do you make minilinks or sublinks under a category? for example you have Arts and Humanities category, there are small links at the bottom of it. Please help!
May 5, 1999, 9:26 PM
Enthusiast (944 posts)
May 5, 1999, 9:26 PM
Post #3 of 16
Views: 5330
Sounds like he's looking for something along the lines of Yahoo's main page. Under each category, you have short-cut links to some of the sub-categories underneath it.
I also thought this might be nice to incorporate, but I don't have an idea where to begin! I imagine it would require some pretty hefty modifying of the build code.
Dan
I also thought this might be nice to incorporate, but I don't have an idea where to begin! I imagine it would require some pretty hefty modifying of the build code.
Dan
May 6, 1999, 11:11 AM
User (207 posts)
May 6, 1999, 11:11 AM
Post #4 of 16
Views: 5313
If thats what you want, you are able to use HTML in the category descriptions, so just inclue the HTML links to the files. I think therew is something in the FAQ about it. Im doin ghtat on my website, servers down for a bit so I cannot show you it.
------------------
------------------
May 6, 1999, 2:06 PM
Enthusiast (944 posts)
May 6, 1999, 2:06 PM
Post #5 of 16
Views: 5278
Jimz,
Yeah, that would work if you weren't concernced about the sub-categories changing from time to time or new sub-cats being added. In either case, you would manually have to update your home template. I was trying to think of a way to automate the whole process. I.e., the home build knows the category pages and the category build knows the sub-category pages, so maybe the home build can also know the sub-category pages? Does that make any sense?
Dan
Yeah, that would work if you weren't concernced about the sub-categories changing from time to time or new sub-cats being added. In either case, you would manually have to update your home template. I was trying to think of a way to automate the whole process. I.e., the home build knows the category pages and the category build knows the sub-category pages, so maybe the home build can also know the sub-category pages? Does that make any sense?
Dan
May 6, 1999, 4:51 PM
New User (4 posts)
May 6, 1999, 4:51 PM
Post #7 of 16
Views: 5309
Hi Jimz & Dan
you got what i mean. The underneath subcategories shortcut links. I have tried it but it works. But i have one more problem on the alignment. It seems to be so far from the main category and its not exactly below it. It moved to the right. Please help. Anyways, Thanks in advance.
you got what i mean. The underneath subcategories shortcut links. I have tried it but it works. But i have one more problem on the alignment. It seems to be so far from the main category and its not exactly below it. It moved to the right. Please help. Anyways, Thanks in advance.
May 7, 1999, 7:13 AM
Enthusiast (944 posts)
May 7, 1999, 7:13 AM
Post #8 of 16
Views: 5321
Jimz,
Is this the variable that will put sub-categories below the categories on the home.html page?
$subcategories{$cat}
From what I can tell, the categories (with their sub-cats) are built in nph-build.cgi, while home.html is built in site_html_templates.pl. This is where I was confused on having to manually update home.html if sub-cats change, but I suppose the two can be tied together. Do I have this completely wrong? My brain's moving kind of slow right now.
Dan
Is this the variable that will put sub-categories below the categories on the home.html page?
$subcategories{$cat}
From what I can tell, the categories (with their sub-cats) are built in nph-build.cgi, while home.html is built in site_html_templates.pl. This is where I was confused on having to manually update home.html if sub-cats change, but I suppose the two can be tied together. Do I have this completely wrong? My brain's moving kind of slow right now.
Dan
May 7, 1999, 9:30 AM
User (289 posts)
May 7, 1999, 9:30 AM
Post #10 of 16
Views: 5324
The category appearance on the home page is controlled by site_html_templates.pl. Look at the very bottom for the code. The categories are defined as a definition list (so it indents the description). If you take out the def list codes and add a break tag after the category name it should put the category right after the description. You also need to add extra breaks after the description to separate the categories with a space.
May 27, 1999, 7:32 PM
Novice (28 posts)
May 27, 1999, 7:32 PM
Post #13 of 16
Views: 5257
Brad Richardson wrote:"The category appearance on the home page is controlled by site_html_templates.pl. Look at the very bottom for the code. The categories are defined as a definition list (so it indents the description). If you take out the def list codes and add a break tag after the category name it should put the category right after the description. You also need to add extra breaks after the description to separate the categories with a space." I looked at that site_html_templates.pl file but I'm still not certain what to do. When you say "If you take out the def list codes..." what exactly do you mean? Reading someone elses script is difficult at the best of times and I'm afraid my knowledge of Perl is just so-so. If someone who has done this could cut and paste I'd be grateful.
Jun 2, 1999, 8:37 PM
Novice (28 posts)
Jun 2, 1999, 8:37 PM
Post #14 of 16
Views: 5239
For anyone that is interested, I have figured it out (after much hair pulling). Here is the bottom part of site_html_templates.pl. I hacked out everything that didn't seem to be necessary. Check out www.2ants.com to see how it looks. I think it looks pretty good.
# We check to see if we are half way through, if so we stop this table cell
# and begin a new one (this lets us have category names in two columns).
if ($i == $half) {
$output .= qq|</td><td class="catlist" valign="top">\n|;
}
$i++;
# Then we print out the name linked, new if it's new, and popular if its popular.
$output .= qq|<strong><a class="link" href="$url">$category_name</a></strong><br>|;
$output .= qq|<span class="descript">$description </span><br><br>| if (!($description =~ /^[\s\n]*$/));
}
# Don't forget to end the unordered list..
$output .= "</td></tr></table></div>\n";
return $output;
}
1;
# We check to see if we are half way through, if so we stop this table cell
# and begin a new one (this lets us have category names in two columns).
if ($i == $half) {
$output .= qq|</td><td class="catlist" valign="top">\n|;
}
$i++;
# Then we print out the name linked, new if it's new, and popular if its popular.
$output .= qq|<strong><a class="link" href="$url">$category_name</a></strong><br>|;
$output .= qq|<span class="descript">$description </span><br><br>| if (!($description =~ /^[\s\n]*$/));
}
# Don't forget to end the unordered list..
$output .= "</td></tr></table></div>\n";
return $output;
}
1;
Jun 7, 1999, 4:25 PM
Novice (28 posts)
Jun 7, 1999, 4:25 PM
Post #16 of 16
Views: 5277
That's all I changed. You put something like <a href="http://www.2ants.com/pages/Computers_&_Internet/Hardware/index.html">Hardware</a>, <a href="http://www.2ants.com/pages/Computers_&_Internet/Software/index.html">Software</a>, <a href="http://www.2ants.com/pages/Computers_&_Internet/Internet/index.html">Internet</a>...
in for the descriptions to your categories right?
in for the descriptions to your categories right?