Gossamer Forum
Home : Products : Links 2.0 : Customization :

make one 'if' out of two

Quote Reply
make one 'if' out of two
Hello everyone,

On the AltaVista page span mod, how can I make

<%if prev%>
<%prev%>
<%endif%>
<%if next%>
<%next%>
<%endif%>

into

<%if prev or next%>
<%prev%>
<%next%>
<%endif%>

? I have Enhanced Template mod installed. God bless!


Daniel
-http://www.christian-search.net
-http://www.csnhost.com
Quote Reply
Re: make one 'if' out of two In reply to
Have you tried the following?

Code:

<%if prev%>
<%if next%>
<%prev%>
<%next%>
<%endif%>
<%endif%>


This is an example of using nested conditional statements via the Enhanced Template.pm Mod.

Regards,

Eliot Lee
Quote Reply
Re: make one 'if' out of two In reply to
That didn't work, it didn't build it on the pages that didn't have the Previous on it. Is there same way the code could be moded to be like Links SQL 1.13 and just have <%next_span%>? I'll look at the code when I get the chance. Thanks for your help!

Daniel
-http://www.christian-search.net
-http://www.csnhost.com
Quote Reply
Re: make one 'if' out of two In reply to
You could try adding another variable/tag called $next_span and use codes like the following in the sub build_category_pages:

Code:

if (($next) or ($prev)) {
$next_span .= qq~TOOL BAR CODES~;
}


I don't understand...haven't you upgraded your Links to LINKS SQL??? Why would you want to stick with a version of Links 2.0? I would recommend upgrading all your LINKS 2.0 diectories to LINKS SQL.

Regards,

Eliot Lee
Quote Reply
Re: make one 'if' out of two In reply to
I have upgraded to Links SQL but doesn't that is only for one installation, right? I tried to figure out how to make Links SQL run my different searches but it was beyond me. So I just decided to keep the current software for all the other searches and use Links SQL for the LinkSearch (my top search). You can see the site as I'm building it at http://www.csnhome.com. I'm hoping that Links SQL 2.0 (not beta) will have the power to do this. Thanks for your help!


Daniel
-http://www.christian-search.net
-http://www.csnhost.com