Gossamer Forum
Home : Products : Gossamer Links : Discussions :

External Linking into a Links SQL Dir!

Quote Reply
External Linking into a Links SQL Dir!
Howdy All,



I'm thinking of partnering with another site who wants to use my links database as a complement to their information on their site. The basically want to link into my Directory to specific final subcategories. I am often moving my final subcategories into other level categories as my Dir grows. So my final subcategories usually do not change (ID=constant) but the position they are in changes relative to the base (/) directory.

Is there a way to call the final subcatergory via an external link independant of it's position with my directory? In other words is there another way to externally link into my Dir without the use of static URL's?



Thank you for your time.
Quote Reply
Re: [curman] External Linking into a Links SQL Dir! In reply to
One way would be to build your pages with a directory field name. To do this you would add a field to your category table called something like 'Directory_Name'.

Then in the Setup > Build Options

You would set the build_directory_field = Directory_Name

When you do this, your category will always have the same url something like: www.domain.com/dir/directory_name_here/index.html.

So, even if you move it's relative position within the categories/sub-categories, or change the name of the category, etc., it will still be found at the same static url.

I do this because I also make changes in the category names, positions, etc., but I don't want to get lost by search engines which have indexed the specific url. Also, it allows me to get keywords into the url for categories.

If you already have an extensive guide, though, you would need to create a unique directory name for all of the existing categories, and then the url's for all of your categories would change. On the plus side, though, they probably would never need to be changed again.

-Katy
Quote Reply
Re: [katy] External Linking into a Links SQL Dir! In reply to
Hi Kathy,



Interesting work around and I do know what you mean by moving cat's on search engines :) . My base tree is fairly stable, it's the branches at the end that I tend to move. So you are saying that doing what you have done you still have a tree/branch structure for navigation but the actual Dir's are set?



All the cat's have an ID number. I wonder if there is an easier way to do this by the ID cat number and page.cgi than to reprogram like you did.



Alex, please jump in here anytime :)
Quote Reply
Re: [curman] External Linking into a Links SQL Dir! In reply to
Yes, this creates a directory for each page with the directory name you set. It works extremely well if you want to keep static pages, and not worry about the category url's changing after they have been indexed by search engines, or when others have linked to a static category page. Also, it keeps the overall url of a manageable length which is good if you go more than a few sub-categories deep. So the various category links for a main category and its sub-categories would look like:

domain.com/dir/main_category/index.html
domain.com/dir/sub_category1/index.html
domain.com/dir/sub_category2/index.html

Rather than having them add to each other:

domain.com/dir/main_category/sub_category1/sub_category2/index.html

But, as you noted there should also be a way to do this dynamically as each category has a uniqe number that identifies it. I wonder if someone knows how to do that?

--Katy
Quote Reply
Re: [katy] External Linking into a Links SQL Dir! In reply to
Quote:
there should also be a way to do this dynamically as each category has a uniqe number that identifies it
There is a way.
In Admin/Setup/Build Options/ you can set the option "foreign_char" to Yes, which will result to have the category ID number instead of Category Name in path & URL, like this:
domain.com/dir/43/index.html
domain.com/dir/829/index.html
domain.com/dir/830/index.html

Best regards,
Webmaster33


Paid Support
from Webmaster33. Expert in Perl programming & Gossamer Threads applications. (click here for prices)
Webmaster33's products (upd.2004.09.26) | Private message | Contact me | Was my post helpful? Donate my help...
Quote Reply
Re: [webmaster33] External Linking into a Links SQL Dir! In reply to
Yes, but if there is a sub-category does this still work? In other words if Category 2 is a sub-category of Category 1, doesn't the category get listed as:

domain.com/dir/1/2/index.html

So, if somehow you change the structure of the subcategories, the links would no longer point correctly? Maybe this works in dynamic mode, but it looks like that also relies on the relative structure of categories/sub-categories. Maybe I'm wrong about this though...

-Katy
Quote Reply
Re: [katy] External Linking into a Links SQL Dir! In reply to
There will be 0 level deep category directories, as I listed in my last post. Will listed as:
domain.com/dir/1/index.html
domain.com/dir/2/index.html

Note all categories has unique IDs. Therefore, (except the case when you delete a category) the changes will not affect directory structure...

Best regards,
Webmaster33


Paid Support
from Webmaster33. Expert in Perl programming & Gossamer Threads applications. (click here for prices)
Webmaster33's products (upd.2004.09.26) | Private message | Contact me | Was my post helpful? Donate my help...
Quote Reply
Re: [webmaster33] External Linking into a Links SQL Dir! In reply to
Hmmm, I just tried this on Links SQL 2.1.1. I set the foreign_char = Yes

Then I built the directory. I get subcategories listed with static urls of:

domain.com/dir/1/2/index.html

Not as:

domain.com/dir/1/index.html
domain.com/dir/2/index.html

Maybe I'm missing something here (is there another setting that might affect this?) as from what I see it definitely affects the category structure.

-Katy
Quote Reply
Re: [katy] External Linking into a Links SQL Dir! In reply to
Uhm, in that case, sorry, it's my mistake. Frown
I thought it will place all in same directory level.

Then likely a plugin will be your solution, together with foreign_char option...

Best regards,
Webmaster33


Paid Support
from Webmaster33. Expert in Perl programming & Gossamer Threads applications. (click here for prices)
Webmaster33's products (upd.2004.09.26) | Private message | Contact me | Was my post helpful? Donate my help...
Quote Reply
Re: [curman] External Linking into a Links SQL Dir! In reply to
I would go with Katy's method. As long as you don't have too many subdirectories with the same name it shouldn't take long to get it working just as you need.

Laura.