Gossamer Forum
Home : Products : Gossamer Links : Discussions :

How to show specific link?

Quote Reply
How to show specific link?
This will sound stupid but ...

I want to show specific link.

I tried with .../search.cgi?ID=1

but that shows ALL ID's with "1" (12,11,10 ...)

Hmmm?
Quote Reply
Re: [Payooo] How to show specific link? In reply to
search.cgi?ID=1;ID-opt==

Ivan
-----
Iyengar Yoga Resources / GT Plugins
Quote Reply
Re: [yogi] How to show specific link? In reply to
Thanks yogi!

Is there a way to show all links data with page.cgi?
Quote Reply
Re: [Payooo] How to show specific link? In reply to
What do you mean by all links data?

Ivan
-----
Iyengar Yoga Resources / GT Plugins
Quote Reply
Re: [yogi] How to show specific link? In reply to
Sorry.

I want to show link description, title and any other custom data/fields on separate/new template ...

Hope this is more informative.

Thanks
Quote Reply
Re: [Payooo] How to show specific link? In reply to
Easiest solution: buy my PageBuilder plugin, you can just define a new template for a link, and view it as page.cgi?page=new_template;link=123

Cheapest solution: write a global that loads all the link information on the template. And because I am nice today: Wink
Code:
sub {
my $id = shift;
return $DB->table('Links')->get($id,'HASH');
}
Use as <%get_link_tags($ID)%>, and you have to load the page using page.cgi?p=your_template;ID=123.

Ivan
-----
Iyengar Yoga Resources / GT Plugins

Last edited by:

yogi: Aug 17, 2002, 2:13 PM
Quote Reply
Re: [yogi] How to show specific link? In reply to
Thank you yogi! Wink

>>

buy my PageBuilder plugin,

>>

I will, very soon! (Any other payment method except PayPal?)



The only problem is that I can't use <%if isNew%> and <%if isChanged%> tags.

You can use them if you place <%if isNew eq "Yes"%> <%if isChanged eq "Yes"%> ...

But then I can't use link.html template because these two tags don't work!?!?! Frown

Is there a way to solve this?

Last edited by:

Payooo: Aug 17, 2002, 5:39 PM
Quote Reply
Re: [Payooo] How to show specific link? In reply to
About IsNew etc: that's indeed true what you say. If you want to display the link on this new template, try:

<%Links::Utils::load_link%>

This will display the link (setting isNew to 1 instead of yes).

Payment methods: PM me, we can sort out something.

Ivan
-----
Iyengar Yoga Resources / GT Plugins

Last edited by:

yogi: Aug 17, 2002, 11:24 PM
Quote Reply
Re: [Payooo] How to show specific link? In reply to
Hi,

If you are just trying to display a LinkID, that is a page with the information from a link (like a detailed page) why not just modify the detail page .html file?

You can probably use the detail_page plugin to do this, just pass in an ID= and maybe edit the template it uses, and you can display any custom page.

You *should* be able to do this with page.cgi as well, just pass in:

...../page.cgi?LinkID=4&p=detailed_link

where detailed_link is the template (without the .html) of the page you want to display, and LinkID is the ID of the link you want to display.

You need to add the d=1 or d=0 parameter, depending on if you want the page to have dynamic or static links.

You need to add the following global, called linkid_data (or whatever):

sub {
return $DB->table('Links')->get($_[0]);
}

and call it with:

<%if LinkID%>
<%linkid_data ($LinkID)%>
<%endif%>

This will *NOT* format the various flags (isNew, etc) and other things that are done when you call the link data through site_html_link. You can always expand the global to do that, if you need to, but if you just want the basic information fields, this will do it.


PUGDOG� Enterprises, Inc.

The best way to contact me is to NOT use Email.
Please leave a PM here.