Gossamer Forum
Home : Products : Gossamer Links : Discussions :

Add Detailed

Quote Reply
Add Detailed
Using Detailed pages. I overcame need for two Add Link include form choices by using include form with "if" statements

<%if ID=5 or ID=7%>
form data1
<%else%>
form data2
<%endif%>


This is limiting (and manual), but it works - sort of.

If I were to Use the Add Link from the Detailed Page itself or the Home page, I get the default form

I have been trying different attempts at a global without much success

sub {
my ($sth,$link,$cat);
my $vals = shift;
my $cat_db = $DB->table('Category');
$cat_db->select_options("ORDER BY Full_Name");
$sth = $cat_db->select ( { Category_Template => 'NewsItems'});
my $output;
$output .= "<href="........">Add News</a>";
return $output;
}
Quote Reply
Re: [gatman] Add Detailed In reply to
I'm not sure what you are trying to do here. I think I saw another thread with some similar Q&A to you.

Did you figure this out yet?

There is a problem with substituting values in the template parser, and I think I reported it in a discussion with paul about 2 months ago or so. We were trying to figure out how to return values that would be recognized.

I have about 9 different versions of Links SQL running on my servers, and I'm trying to get them all upgraded to the same level ASAP, and tweak out the bugs from the upgrades. Until I'm working at the same level on all my sites, with the most current Links, I'm trying not to make too much out of some quirky subtleties.

But, there should be an "automatic" way to flag the links, using at the worst a global that you could edit, and keep track of all the "special cases" in one place.


PUGDOG� Enterprises, Inc.

The best way to contact me is to NOT use Email.
Please leave a PM here.
Quote Reply
Re: [pugdog] Add Detailed In reply to
No - I haven't figured it out.. Sort of got stalled on another immediate issue (like making Perl, mySQL, and the script work right on this #@%$*% Windows machine) Wink
Quote Reply
Re: [gatman] Add Detailed In reply to
Just a thought - could you pass in another variable in the link to the add form? So one of the forms has form=news in the url and then you can use <%if form eq 'news'%> in the form template.

Laura.
Quote Reply
Re: [afinlr] Add Detailed In reply to
I did a cheap work around. I just created two different include_menus and hardcoded ID=2.

<a href="<%db_cgi_url%>/add.cgi?ID=2">Add News</a> &#149;<br>

Works for me temporarily, but still not the right way.