Gossamer Forum
Home : Products : Gossamer Links : Discussions :

Re: [Alex] lowercase directory but uppercase category?

Quote Reply
Re: [Alex] lowercase directory but uppercase category? In reply to
In Reply To:
Hi Jeff,

If you are interetsed (or anyone else reading this thread), the steps would be:

1. Add a field to your category table called 'Directory'. Make it a CHAR of size 255.
2. Go to Setup->Build Options, and edit build_directory_field, set this to 'Directory'.

Now Links SQL will use that field for what the directory name should be. So when you add a category, you just need to enter in the directory name as well.

If you already have a lot of category and need to update them all to lowercase, use pugdog's SQL statement above.

Cheers,

Alex

--
Gossamer Threads Inc.


I tried this last night and to my dismay it created the directories as absolute to the root instead of relative of the parent Category. For ex, if the Category was "Cars/Volkswagen" and Directory="vw", it created the physical directory as "/vw". Logically, I assumed that it would have created the directory relative to it's parent, e.g. "/Cars/vw". Imagine the nightmare if you had 100 subcats to "Cars" and decided to change "Cars" to "Automobiles". You would have to edit the Directory field for 100 diff records. Sure, you could use SQL, but the point is that the potential for error is tremendous.

If I had designed it, it would work as follows:

- if Directory IS NULL => create the physical dir in the Normal manner, i.e. use the Category Name and convert space to "_".

- if Directory IS NOT NULL => use the value for Directory, the path is relative to the parent Category

Example

1. Category = "Cars", Directory=NULL ==> /Cars/

2. Category = "Cars/Volkswagen", Directory="vw" ==> /Cars/vw/

3. Category = "Cars/Dodge Trucks", Directory=NULL ==> /Cars/Dodge_Trucks/

If you wanted to make the directory absolute to the root, you could specify "/" as the first char, e.g. "/vw"

Last edited by:

vicos2: Jan 9, 2003, 5:57 PM
Subject Author Views Date
Thread lowercase directory but uppercase category? jeffb 6991 Apr 17, 2001, 4:53 PM
Thread Re: lowercase directory but uppercase category?
Mishpat 6898 Apr 18, 2001, 12:42 AM
Thread Re: lowercase directory but uppercase category?
jeffb 6950 Apr 18, 2001, 6:41 AM
Thread Re: lowercase directory but uppercase category?
Paul 6912 Apr 18, 2001, 6:47 AM
Thread Re: lowercase directory but uppercase category?
jeffb 6881 Apr 19, 2001, 9:56 AM
Thread Re: lowercase directory but uppercase category?
jeffb 6856 Jul 17, 2001, 4:11 AM
Thread Re: lowercase directory but uppercase category?
pugdog 6835 Jul 17, 2001, 10:08 AM
Thread Re: lowercase directory but uppercase category?
jeffb 6910 Jul 17, 2001, 10:34 AM
Thread Re: lowercase directory but uppercase category?
pugdog 6880 Jul 17, 2001, 12:47 PM
Thread Re: lowercase directory but uppercase category?
jeffb 6888 Jul 17, 2001, 1:27 PM
Thread Re: lowercase directory but uppercase category?
pugdog 6822 Jul 17, 2001, 1:43 PM
Thread Re: lowercase directory but uppercase category?
jeffb 6874 Jul 17, 2001, 2:59 PM
Post Re: lowercase directory but uppercase category?
spiff 6685 Aug 4, 2001, 2:07 PM
Thread Re: lowercase directory but uppercase category?
Alex 6811 Jul 17, 2001, 3:56 PM
Post Re: lowercase directory but uppercase category?
pugdog 6787 Jul 18, 2001, 3:59 PM
Thread Re: [Alex] lowercase directory but uppercase category?
vicos2 6612 Jan 9, 2003, 5:11 PM
Thread Re: [vicos2] lowercase directory but uppercase category?
afinlr 6552 Jan 10, 2003, 4:09 PM
Post Re: [afinlr] lowercase directory but uppercase category?
webmaster33 6525 Jan 11, 2003, 8:15 AM
Thread Re: [Alex] lowercase directory but uppercase category?
Karen 6251 Oct 8, 2003, 12:11 PM
Thread Re: [Karen] lowercase directory but uppercase category?
afinlr 6237 Oct 8, 2003, 5:10 PM
Thread Re: [afinlr] lowercase directory but uppercase category?
Karen 6239 Oct 8, 2003, 5:37 PM
Post Re: [Karen] lowercase directory but uppercase category?
afinlr 6220 Oct 9, 2003, 4:59 AM
Post Re: lowercase directory but uppercase category?
spiff 6719 Jul 20, 2001, 2:46 PM