Gossamer Forum
Home : Products : Links 2.0 : Customization :

Linking listings straight to the details pages

Quote Reply
Linking listings straight to the details pages
I set the links.cfg script to use detailed pages. Now how can I link the listings where there should be http:// straight to those details pages for each listing?

Quote Reply
Re: Linking listings straight to the details pages In reply to
If you searched for Detailed Pages, you would've found quite a few Threads that provide explanations and codes for doing this....

Anyway...as mentioned before...

You add the following link codes in your link.html file:

Code:

<a href="<%build_detail_url%>/<%ID%><%build_extension%>">Detailed Pages</a>


Make sure that you have defined build_extension as a global variable in the %globals hash in the site_html_templates.pl file, like the following:

Code:

build_extension => $build_extension


Regards,

Eliot Lee

Quote Reply
Re: Linking listings straight to the details pages In reply to
I did that exactly as you said, but after I "Build All", when I go to the listing on my site, I get the following error:

Unkown Tag: build_detail_url

Also, what do I put when it asks me for the listing's URL in my Admin panel?

Quote Reply
Re: Linking listings straight to the details pages In reply to
Nevermind, I was able to detect where the problem was. Thanks for all your help, it worked like a charm.

All though this is off topic, but I need help with the non-english characters. I installed the mod for version 2 but I'm still not able to have a "-" or a "&" in my category names. Can you help please?

Quote Reply
Re: Linking listings straight to the details pages In reply to
I want the link go straight to the details pages. I followed exactly Eliot Lee's instructions. But when I built and run the program, I got error message

Unkown Tag: build_detail_url

Please help

Senaite








Quote Reply
Re: Linking listings straight to the details pages In reply to
Right...and you need to have the following global variable defined:

Code:

build_detail_url => $build_detail_url


Remember that if this is your last global variable in the %globals hash, then you need to add a comma at the end of the precedding line.

Also, you could simply use the following link:

Code:

<a href="<%build_root_url%>/Detailed/<%ID%>.shtml">Detailed Page</a>


HOWEVER, if you change the Detailed directory or build_extension, then you will have to continually edit the link.html to update the correct directory and extension...that is why defining global variables is MUCH easier and more manageable in the long-term.

Regards,

Eliot Lee

Quote Reply
Re: Linking listings straight to the details pages In reply to
It works.

Thanks Eliot

Senaite

Quote Reply
Re: Linking listings straight to the details pages In reply to
Good.

Regards,

Eliot Lee

Quote Reply
Re: Linking listings straight to the details pages In reply to
The Detailed Page works perfectly, but not the jump.cgi.
If I leave "http://" in the URL field, it jumps to Detailed page OK.
But, if I remove "http://" in the URL field, it shows error

Error: Can't find link id: (ID#)

I set URL field optional. I don't want to display "http://" in the Detailed page, if the link does not have a website.

Any way to fix this problem? Please help

Thanks

Senaite

Quote Reply
Re: Linking listings straight to the details pages In reply to
Download and install the isLinked Mod located in the Resource Center (click on Resources link at the top of the forum web pages).

Regards,

Eliot Lee

Quote Reply
Re: Linking listings straight to the details pages In reply to
My detailed pages are built fine but when I try to add this to my link.html file:

<a href="<%build_detail_url%>/<%ID%><%build_extension%>">info</a>

I redceived a build extension error as described above. I then added the build_extension => $build_extension to the globals section at the top of the site_html_templates.pl and received the following error:

Error including libraries: syntax error at /web1/tr100538/cgi-bin/links/admin/site_html_templates.pl line 40, near "$build_extension site_title" Compilation failed in require at /web1/tr100538/cgi-bin/links/admin/nph-build.cgi line 33. Make sure they exist, permissions are set properly, and paths are set correctly.

Any help would be appreciated.

Quote Reply
Re: Linking listings straight to the details pages In reply to
Okay...I changed the build extension variable to:
build_detail_url => $build_detail_url in the globals section and now I receive the following error whrn I try to view links:

Unkown Tag: build_extensionUnkown

Quote Reply
Re: Linking listings straight to the details pages In reply to
You need to have commas AFTER each of the values you add in the GLOBAL HASH (as stated quite a few times in these forums) EXCEPT for the last value....

EXAMPLE:

Code:

build_extension => $build_extension,
build_detail_url => $build_detail_url,
site_title => $build_site_title


See the commas??? If not, then look again at the bolded blue codes.

Regards,

Eliot Lee
Quote Reply
Re: Linking listings straight to the details pages In reply to
I have it working now....

I simply added the following to the globals:

build_extension => $build_extension,
build_detail_url => $build_detail_url