Gossamer Forum
Home : Products : Gossamer Links : Discussions :

letterbar in category templates

Quote Reply
letterbar in category templates
hello
there was a discussion about letterbars in links-SQL1.11 version,
but which global do i need, to add this in links-SQL 2.0
(see http://www.dmoz.org for example)


Quote Reply
Re: letterbar in category templates In reply to
It really depends on how you want to do it.

If the bar is the same for all pages, make it into a file, and <%include filename.txt%> to use it.

PUGDOGŪ
PUGDOGŪ Enterprises, Inc.
FAQ: http://pugdog.com/FAQ


Quote Reply
Re: letterbar in category templates In reply to
do you mean for categories like

> Top > Something > A
> Top > Something > B

but having it like

A B C D E F G H I J K L etc...

I hope so, that is also something i really want (just like dmoz.com (lots of features from dmoz.com that really should be brought over to links).)

Hope this is implemented somehow.

http://www.ASciFi.com/ - The Science Fiction Portal
Quote Reply
Re: letterbar in category templates In reply to
i want it simmilar to dmoz.org
for each category a letterbar with all the links ordered alphabetical in that category

for example:
i have in category 'computers' an letterbar
ABCDEFGHIJKLMNOPQRSTUVWZYZ
now when I click on A, i get all links starting with letter A in category 'computers'

I tried this with a search like:
search.cgi?d=1&query=a&catid=1

but this does not work because a is too short search term
I rebuild index and set index weight on default

Quote Reply
Re: letterbar in category templates In reply to
You can't really do that. The only real way to make it work would be to add some routines to check the links output and add <A NAME> tags to start each of the selections.

Or, you could do your own search routines, and pass in the query "like 'a%'", "like 'b%'", "like 'c%'", etc....

There is no "simple" solution for this.

If you wanted to build one page per letter per category, it would mean changing the build routines significantly as well.

It could be done, but there are a lot of llittle things that would need to be taken into consideration to keep it all "neat".

PUGDOGŪ
PUGDOGŪ Enterprises, Inc.
FAQ: http://pugdog.com/FAQ


Quote Reply
Re: letterbar in category templates In reply to
ok this is what i want:

http://dmoz.org/Arts/Movies/Titles/

really it is just the same, the only thing that would be different would be the actual display of the template for that category i would think? is there no way to do that?

http://www.ASciFi.com/ - The Science Fiction Portal
Quote Reply
Re: letterbar in category templates In reply to
What they seem to have done is moved the links into sub categories, but not display the "leaf". This is probably possible, but it means moving your links.

Doing it as a dynamic search is a bit trickier... but probably this 2-option thing could be done as a plug-in mod. But it's not trivial.

PUGDOGŪ
PUGDOGŪ Enterprises, Inc.
FAQ: http://pugdog.com/FAQ


Quote Reply
Re: letterbar in category templates In reply to
oh this is what i want, i want the links to be in subcategories just like that - what i just need to do is display the categories in that different way so i don't have

A B
C D
E F
G H

which is going to look pretty ugly!

i would love it as a possible plug in mod. Would be very useful for big directories (if not essential) i would think.

http://www.ASciFi.com/ - The Science Fiction Portal
Quote Reply
Re: letterbar in category templates In reply to
Your spell checked post is below.

That goes back to just the original idea.

Create a letter bar as an include file.

You would want to turn the Category.FullName into a path tag, so you can use it in the URL (I don't think there is a tag for that returns the URL, but also a visual tag to click).

You want to create the file such that:

Code:
|<%url_to_current_category%>/a>A</A>
|<%url_to_current_category%>/b>B</A>
(The forum stripped out the href stuff, so use your imagination)

If you didn't have separate subcategories, you'd link this to a search query, limited to this category.

Insert this at the top of your category page, and it will create a link to the alphabetic subcategories.

You need to do a bit of template magic to turn off the other category display, or just leave it alone, with this at the top.

Of course, you only want the letter bar to show in the _last_ category (lowest level-1) before the alphabetic sub directories.

I don't have the time to do any more with this now. Even as a paid job, I couldn't get to it for a couple of weeks.


PUGDOGŪ
PUGDOGŪ Enterprises, Inc.
FAQ: http://pugdog.com/FAQ


Quote Reply
Re: letterbar in category templates In reply to
thanks Pugdog that is very helpfull. I do find this program quite a bewildering one to mod to make it do what you want, it is a lot harder than php especially with the dynamic and static versions you need to consider, but i will have a go with this - at least i now have a way to do it.

Thanks :)

http://www.ASciFi.com/ - The Science Fiction Portal