Gossamer Forum
Home : Products : Gossamer Links : Discussions :

Portable Full_Name

Quote Reply
Portable Full_Name
Hello,

I have searched for the answer to my question on this forum, have not found the solution that works for me.

I want to stick Full_Name in link anywhere any pages. For instance, <a href="http://www.mydomain.com/<%Full_Name%>/One_Deep_Inner_SubCategory/index.html">

However, the <%Full_Name%> would contain a blank in between the full name as it's out of the wall from database column such as--> Something Cool , which is not what I want and it would end up on 404 page as it is not the url to the category. My question is, how do I or what is the tag to the Full_Name's URL, for instance; Something_Cool (with underline)



What should be if I'm about to make a global for this..

something like.. Full_Name with underline if there's blank space between word...etc
Quote Reply
Re: [DIMSUMGIRL] Portable Full_Name In reply to
Something like;

<a href="http://www.mydomain.com/<%Get_Full_Name($FatherID)%>/One_Deep_Inner_SubCategory/index.html">

Code:
sub {

my $FatherID = shift;

my $tbl = $DB->table('Category');
my $sth2 = $tbl->select( { ID => $FatherID } );
my $full;

# get the URL, so we can redirect in a second...
while (my $hit = $sth2->fetchrow_hashref) {
$full = $hit->{Full_Name};
}

return $full;

}

Untested, but it should work.

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] Portable Full_Name In reply to
hmm doesn't work.

Wonder how to write a global to turn full name into url, something like... add underscore in the full name if there's space between words. This should be simple enough, but I've not yet figured this out.
something has to do with this

$CFG->{build_root_url} . "/" . $cat_db->as_url ($row->{Full_Name}) . "/" . $CFG->{build_index}

but without build_index
hmm
any idea, people?

Last edited by:

DIMSUMGIRL: Jul 24, 2003, 2:13 AM
Quote Reply
Re: [DIMSUMGIRL] Portable Full_Name In reply to
LoL After I had been trying all night. I told myself.. NEVER MIND~~ grrr

I just added a new column field to Category, call it Full_Name_URL

then use this <a href="http://www.mydomain.com/<%Full_Name_URL%>/One_Deep_Inner_SubCategory/index.html">

and fill out 500 subcategories

not too bad, it works, at least

hehe Laugh