Gossamer Forum
Home : Products : Gossamer Links : Discussions :

making category_clean a link

Quote Reply
making category_clean a link
Hello all!

I am starting out using links 2.0. I will upgrade in the near future but want to see if my site can work first before I do so.


Anyway in links 2.0 I use the category_clean near the top of the page to show the web surfer where they are. An example is Electronics : Audio. What I want it to do is make the Electronics a link to the /Electronics/ directory and the Audio to be a link to /Electronics/Audio/. So each category is a link back to that categories directory. I have searched and searched and could not find the answer.

I got close though. I used <a href="$url"><%category_clean%></a> but when I build it, it adds the $url at the end of it so the link looks like /Electronics/Audio/$url and the /Electronics/ is not separate it is part of the whole link. So the page link looks like this

Home: Electronics :Audio

Where everything that is underlined is a link.

I hope I have explained what I want.

Any help is greatly appreciated.

Thank you.
Quote Reply
Re: [bytor] making category_clean a link In reply to
This is included in the templates... take a look at the demo http://demo.gossamer-threads.com/linkssql/
Quote Reply
Re: [bytor] making category_clean a link In reply to
What you want is this:

<%Links::Utils::format_title($title_loop, separator => $crumb_separator, no_escape_separator => $no_escape_crumb_separator, include_home => 1, no_span => 1)%>

Quote:

# Options:
# separator (required)
# The separator used to join the items.
# no_escape_separator
# Set this to a true value if you do not wish to HTML escape the separator.
# include_home
# Whether or not to include Home as the first entry. Default is no.
# link_type
# How the items should be linked:
# 0: No items linked
# 1: All items linked separately
# 2: All except the last item linked separately
# 3: All items linked as one single link (using the last item's URL)
# no_span
# Don't add the span tags around the last portion of the title. Default is to include the span tags.
#
# Note: You can override this function by creating a format_title_override global
#


replace <%category_clean%>

Hope this helps,

- Jonathan
Quote Reply
Re: [jdgamble] making category_clean a link In reply to
No it did not work. I get a

Unkown Tag: links::Utils::format_title($title_loop, separator => $crumb_separator, no_escape_separator => $no_escape_crumb_separator, include_home => 1, no_span => 1)

error on the page it was to create.

I know the first reply to this thread was not accurate because I am using links 2.0 not sql. I don't know if it is what you were thinking to.

Thanks for trying.
Quote Reply
Re: [bytor] making category_clean a link In reply to
Why are you posting in this forum if you are using Links 2.0? There is a completely seperate category here for that version. That's why you're getting code that doesn't work...

To answer your question, you want to edit build_linked_titled in db_utils.pl.

Philip
------------------
Limecat is not pleased.
Quote Reply
Re: [fuzzy logic] making category_clean a link In reply to
Sorry

Did not see it further down.

Frown