Gossamer Forum
Home : Products : Gossamer Links : Discussions :

Use of build_detail_format

Quote Reply
Use of build_detail_format
Hi there,

when using the advanced option of 'build_detail_format' I've noticed that there is always the '_<%ID>' suffix added to the detailed pages. I'm trying to build the detail pages straight into the category pages by using

build_category_format (advanced) = %Build_Directory%

where %Build_Directory% is a custom field of the category table based on the full category path in lower case and

build_detail_format (advanced) = %Build_Directory%/%Build_Name%/index

where %Build_Name% is a custom field of the links table based on the link title in lower case.

This should result in a structure like this

category CCC


detail page of link DDD in category CCC


but unfortunately it will be


assuming the link has 123 as it's ID.

Is there any way to drop the '_ID' suffix without modifing lsql core files?

Last edited by:

Ca5ey: Aug 22, 2005, 1:53 AM
Quote Reply
Re: [Ca5ey] Use of build_detail_format In reply to

The ID is put into the URL, to avoid duplicate file name problems =) (just in case).


Andy (mod)
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] Use of build_detail_format In reply to
Hi Andy,

I know why the ID is used in the URL. My point is that according to 'build_detail_format' it simply shouldn't touch the information entered there. The 'Build_Name' field is unique and the system should trust my settings, which it obviously doesn't. ;)

Another point is that dynamic mode refuses to work when the build detail path is equal to the root path.
Quote Reply
Re: [Ca5ey] Use of build_detail_format In reply to
No, there's no way of doing that without modifying the code. The code currently checks that you have the %ID% in the format and appends it if it doesn't (to guarantee that it's unique). You can change this behaviour by commenting out admin/Links/Table/Links.pm, line ~400:
$format .= '_%ID%' unless $format =~ /%ID%/;

Quote Reply
Re: [brewt] Use of build_detail_format In reply to
Thanks Adrian. Additionally you'd have to edit line 413 and change

$parsed =~ s{(^|[/\\])index$}{${1}_index};


$parsed =~ s{(^|[/\\])index$}{${1}index};

to get rid of the underscore. This results in a "perfect" URL of a detail page in terms of URL logic. Nevertheless, the 'build_detail_url' has to be equal to the 'build_root_path' and you're loosing the dynamic mode then.