Gossamer Forum
Home : Products : Links 2.0 : Discussions :

Detailed view?

Quote Reply
Detailed view?
I cant figure out how to let the users be able to view the detailed pages.
When I build the pages, detailed pages are build, I can see that. And I also see that the Detailed subdir are buildt, and the pages within.
But no link is showing in the links pages
From the main page I see this menubar:
| Home | Add a Resource | Modify a Resource | What's New | What's Cool | Top Rated | Email Updates | Random Link | Search |

When clicking on a created category, I see the links added, but then the only option I see is to click on the link that brings me to that webbsite, and the "Rate It" link.
There is no menulink that gives me the option to view any link in detailed pages.

I have messed with the links.css, and thougt a wrong colour could be hiding it for me, but I have checked the html source for the page generated, and there is no detailed link in there.

Anyone have a clue?

Quote Reply
Re: Detailed view? In reply to
In link.html add:

Code:
<a href="<%build_detail_url%>/<%ID%>.html">Detailed</a>
Mods:http://wiredon.net/gt/download.shtml
Installs:http://wiredon.net/gt/


Quote Reply
Re: Detailed view? In reply to
I have done it like you see here:
Then when I try to open a category page to view the links, the only thing I see is this:
Unkown Tag: build_detail_url

This shows where I put your code:
<ul><li><a class="link" href="<%db_cgi_url%>/jump.cgi?ID=<%ID%>"><%Title%><a href="<%build_detail_url%>/<%ID%>.html">Detailed</a>

<%if Description%>
<span class="descript">- <%Description%></span>
<%endif%>

<%if isNew%>
<small><sup class="new">new</sup></small>
<%endif%>

<%if isPopular%>
<small><sup class="pop">pop</sup></small>
<%endif%>

<small class="date">(Added: <%Date%> Hits: <%Hits%> Rating: <%Rating%> Votes: <%Votes%>) <a href="<%db_cgi_url%>/rate.cgi?ID=<%ID%>">Rate It</a></small>

</ul>

Where shall I actually put it?

Quote Reply
Re: Detailed view? In reply to
build_detail_url is not a global tag out-of-box....

You need to add the following in the %globals hash (as mentioned a few times in the Links 2.0 Customization forum...detailed pages)....

Code:

build_detail_url => $build_detail_url


Of course, you could hard code the folder where your detailed pages are located using an out-of-box global tag in your link.html file...

Code:

<a href="<%build_root_url%>/Detailed/<%ID%>.html">Detailed Pages</a>


Regards,

Eliot Lee Wink
http://anthrotech.com/
Quote Reply
Re: Detailed view? In reply to
You may also want to use if/ifnot tags so only those links with detailed pages show a corresponding link. You will need the enhanced template parser for that.

Code:
Sig-I was born in : s,\d{3}(\d{4}),$1,+print,if$_=sub{} - 18652227;
Quote Reply
Re: Detailed view? In reply to
That is only if you want to reference certain links as having detailed pages by adding a field called something like isDetailed (Yes/No).

As default, Links 2.0 builds detailed pages for all links (if you "turn on" detailed page builds in the links.cfg file). So, using conditional statements to see if there is a detailed page is not necessary...only if you are checking on a field like I mentioned above.

Regards,

Eliot Lee Wink
http://anthrotech.com/
Quote Reply
Re: Detailed view? In reply to
What I've done on my installation (in brief) is use....

Code:
if ($data[$db_detailed]) {
rest of build_detailed sub (in nph-build.cgi)
}
...remembering to add $db_detailed = field; in links.def

That way only detailed pages will be built for the links needing them.

Code:
Sig-I was born in : s,\d{3}(\d{4}),$1,+print,if$_=sub{} - 18652227;
Quote Reply
Re: Detailed view? In reply to
So, if I get you right, Paul, your code allows for selectively built Detail Pages, right?

Thanks. Smile

DT

Quote Reply
Re: Detailed view? In reply to
Right...but you still have to use conditional statement (IF) for the isDetailed field, in order to properly link selected detailed pages...don't need enhanced template codes to do this.

Regards,

Eliot Lee Wink
http://anthrotech.com/
Quote Reply
Re: Detailed view? In reply to
Yes, it will only build detailed pages for links that have data in the detailed field.

Code:
Sig-I was born in : s,\d{3}(\d{4}),$1,+print,if$_=sub{} - 18652227;
Quote Reply
Re: Detailed view? In reply to
Thanks everyone :-)

I am just a newbie, so some of these suggestions I have to work on for some time to understand them.

So, as a start I will use the suggestion of AnthroRules
<a href="<%build_root_url%>/Detailed/<%ID%>.html">Detailed Pages</a>

Thanks AnthroRules :-)

I will learn more of those other heavy coder suggestions as time goes...but for now i have got it working the simple way, and thats good.

Thanks everyone :-)