Gossamer Forum
Home : Products : Gossamer Links : Discussions :

A couple of questions

Quote Reply
A couple of questions
I have a couple of questions, easy questions and I hope someone could give me a good answer to them.

First: I have several categories and they all use category.html template as default, but I want to write different stuff in each category. I have already placed my footer and header in my category template, but I want to make another "footer/header" so that I can place more different stuff for each category. How do I do that?

Second: When people submit sites into my categories I want to them to be able to check a radio button if their site is personal or business and when I build my category pages my personal links comes first and then the business links. I understand I have to modify add.html and category.html and category properties maybe. How do I do that?

Third: The "New Links" display only links as "October 25th (5)", I want this html to list all new links as a big list, not just the dates and how many.

I would like answers that are easy to follow 1,2,3..

Thanks for reading my questions!
Quote Reply
Re: [drumstick] A couple of questions In reply to
Hi Drumstick,

You can try the following:

“First: I have several categories and they all use category.html template as default, but I want to write different stuff in each category. I have already placed my footer and header in my category template, but I want to make another "footer/header" so that I can place more different stuff for each category. How do I do that? “

In Admin > Browse> Category Browser > Modify Category you can set Header ,Footer and a custom Category template for each individual category.

“Second: When people submit sites into my categories I want to them to be able to check a radio button if their site is personal or business and when I build my category pages my personal links comes first and then the business links. I understand I have to modify add.html and category.html and category properties maybe. How do I do that? “

Setup a new column in the links table called LinkType with 2 options, business and personal.
Then you can put hidden value like :
<input type="hidden" name="LinkType" value="<%LinkType%>"> in the link.html template.
Then replace the call to links in the category template with something like :

<%loop links_loop%>
<%if LinkType eq ‘personal’%>
<%include link.html%>
<%endif%>
<%endloop%>
<%loop links_loop%>
<%if LinkType eq ‘business’%>
<%include link.html%>
<%endif%>
<%endloop%>



“Third: The "New Links" display only links as "October 25th (5)", I want this html to list all new links as a big list, not just the dates and how many.”

Place the following in your template globals, call it “newlinks” and then place <%newlinks%> where you want the list to be displayed.
Change ‘Limit 10’ to the number of links you want to display.

sub {
# Displays the newest links site wide.
my ($output,$sth,$link);
my $search_db = $DB->table('Links');
$search_db->select_options ('ORDER BY ADD_DATE DESC', 'Limit 10');
$sth = $search_db->select ( { isNew => 'Yes'}, { isValidated => 'Yes'});
while ($link = $sth->fetchrow_hashref) {
$output .= Links::SiteHTML::display ('link', $link);
}
return $output;
}

Regards

minesite
Quote Reply
Re: [minesite] A couple of questions In reply to
Thanks for your answer, but still I wonder what I should write in the category template field? If i try to add category.html it just fails when i build my pages. Is that category supposed to be added from the template section?
I don´t know, you have to give me more accurate information.

There are also many columns in the links table and I don´t know what to write in all of them to get this thing to work. A screenshot of your configuration of this would be nice.

Thanks for your time!
Quote Reply
Re: [drumstick] A couple of questions In reply to
Hi drumstick

Its to detailed for me to post here.

Do you have the Links PDF file documentation that came with the programme, if not you can download it from GT.
Its about 2 megs and will give you all the details you need to get started.

Also go to the resources section for adding a column


http://www.gossamer-threads.com/scripts/resources/Links_SQL/FAQ/Version_2_x/index.html

Resources in Links SQL: FAQ: Version 2.x
Adding A Column - A detailed description of the fields and processes involved in creating a column for your Links SQL database.

Adding A Column: A Walkthrough - A step-by-step description of the creation of a sample column.




If you have any problems, post here and I will try to help.

Regards

minesite
Quote Reply
Re: [drumstick] A couple of questions In reply to
If i goto category properties in links and then add a column called "categorytitle" with the same properties as footer and header, how can I insert values for this in the category browser? I want to make custom titles for every category without using <%categorytitle%> tag that is currently used.
Quote Reply
Re: [drumstick] A couple of questions In reply to
Hi drumstick

You've stated :


I want to make custom titles for every category without using <%categorytitle%> tag that is currently used.

I have several categories and they all use category.html template as default, but I want to write different stuff in each category. I have already placed my footer and header in my category template, but I want to make another "footer/header" so that I can place more different stuff for each category.



Do you want completely different templates for each category ?
Or just change the title ?
Or just change the header / footer ?

I'm not sure what you are trying to achieve so its difficult to answer, could you give an example of what your trying to do.

Regards

minesite
Quote Reply
Re: [minesite] A couple of questions In reply to
I solved my category problem now. Instead of filling out metaname, description with keywords I use these tags as title tags and top header tags. Now i can have completely diffrent titles for every page and also another header! Perfect! Wink

Now I just have to solve the radio button thing, but I will wait with that until I have more time and information.