Webmastersite.net
Register Log In

MultiCheck boxes

Comments on MultiCheck boxes

Damir
Forum Regular

Usergroup: Customer
Joined: Jan 25, 2005
Location: Croatia

Total Topics: 46
Total Comments: 136
Damir
Posted Mar 08, 2008 - 6:42 AM:

Can someone help?

I have created Multicheckboxes for link

<tr>
<td class="labelscolumn"><span class="labels">Template Category</span></td>
<td class="optionscolumn"><input type="hidden" name="linkcat[123]" value="" /><input type="checkbox" name="linkcat[]" value="3 colors" {LINKCHECKED[linkcat <,> 3 colors]} /> 3 colors <input type="checkbox" name="linkcat[]" value="3D style" {LINKCHECKED[linkcat <,> 3D style]} /> 3D style <input type="checkbox" name="linkcat[]" value="Agriculture" {LINKCHECKED[linkcat <,> Agriculture]} /> Agriculture <input type="checkbox" name="linkcat[]" value="Animals & Pets" {LINKCHECKED[linkcat <,> Animals & Pets]} /> Animals & Pets <input type="checkbox" name="linkcat[]" value="Architecture" {LINKCHECKED[linkcat <,> Architecture]} /> Architecture <input type="checkbox" name="linkcat[]" value="Art & Photography" {LINKCHECKED[linkcat <,> Art & Photography]} /> Art & Photography <input type="checkbox" name="linkcat[]" value="ArtWorks" {LINKCHECKED[linkcat <,> ArtWorks]} /> ArtWorks <input type="checkbox" name="linkcat[]" value="Beauty" {LINKCHECKED[linkcat <,> Beauty]} /> Beauty <input type="checkbox" name="linkcat[]" value="Books" {LINKCHECKED[linkcat <,> Books]} /> Books <input type="checkbox" name="linkcat[]" value="Business" {LINKCHECKED[linkcat <,> Business]} /> Business</td>
</tr>







Now member select some check boxes that are right for there link and i would like to show them on link detail page what link variable must i put there to show only the check values.

Like this

Template Category: Architecture, Books, Business
Paul
developer

Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California

Total Topics: 61
Total Comments: 7868
Paul
Posted Mar 12, 2008 - 7:07 AM:

According to scripts.webmastersite.net/w...adding-a-new-field-98.html , "If you're dealing with a checkbox or single selector and want to test if a value is selected, you can use {LINKCHECKED[fieldname]} (or {CAT, {MEMBER etc) in your template conditional. If dealing with a multi-value checkbox or selector, you can use {LINKCHECKED[fieldname <,> value]} to test for each value."

<IF {LINKCHECKED[linkcat <,> Architecture]}>Architecture</IF> etc
Damir
Forum Regular

Usergroup: Customer
Joined: Jan 25, 2005
Location: Croatia

Total Topics: 46
Total Comments: 136
Damir
Posted Apr 26, 2008 - 3:09 PM:

I have a problem Paul
I would like to use filters to filter the resaults of the custom multi-value checkbox i have made these and they dont work can you tell me where is the problem?

<IF {LINKCHECKED[category <,> Other]}>Other</IF>
<IF {LINKCHECKED[category <,> Online store/shop]}>Online store/shop</IF>
This works great
----------------------------------

I tried this to filter by link but its not working
<a href="{LINKFILTERLINK[category <,> Other]}">Other</a>
i get this link in broswer
http://..../index.php?action=displaycat&catid=1&linkfilteraction=add&filter=category&filtervalue=%7C%7C%7CCars%7C%7C%7CCSS%7C%7C%7CWeb+design%7C%7C%7COther


I also tryed by form its not working
<form action="index.php?action=displaycat&catid={CATID}&filter=category&linkfilteraction=add" method="post">
<select name="filtervalue">
<option value="Other">Other</option>
</select>
<input type="submit">
</form>
Paul
developer

Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California

Total Topics: 61
Total Comments: 7868
Paul
Posted Apr 27, 2008 - 1:29 AM:

scripts.webmastersite.net/w.../articles/filters-201.html
To filter to any text that contains a term, use filtertype=contains. To filter to any text that is not equal to the specified text, use filtertype=not.


When you don't specify a filter type, it does greater than.
Damir
Forum Regular

Usergroup: Customer
Joined: Jan 25, 2005
Location: Croatia

Total Topics: 46
Total Comments: 136
Damir
Posted Apr 27, 2008 - 2:13 PM:

Ok in the form it works great when i add filtertype=contains

But where do i put filtertype=contains in this so i can make it as a link?

<a href="{LINKFILTERLINK[category <,> Other]}">Other</a>
Paul
developer

Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California

Total Topics: 61
Total Comments: 7868
Paul
Posted Apr 27, 2008 - 7:24 PM:

You have to construct the link manually, not using {LINKFILTERLINK}.

Actually I don't see any {LINKFILTERLINK} in the docs anywhere. There's a {LINKFILTER} but it only has one parameter, so I don't where you got the idea of {LINKFILTERLINK[category <,> Other]} from.
Paul
developer

Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California

Total Topics: 61
Total Comments: 7868
Paul
Posted Apr 27, 2008 - 7:35 PM:

Changing now to add a second parameter to {LINKFILTER}.
Damir
Forum Regular

Usergroup: Customer
Joined: Jan 25, 2005
Location: Croatia

Total Topics: 46
Total Comments: 136
Damir
Posted Apr 28, 2008 - 6:20 AM:

Paul wrote:

Actually I don't see any {LINKFILTERLINK} in the docs anywhere. There's a {LINKFILTER} but it only has one parameter, so I don't where you got the idea of {LINKFILTERLINK[category <,> Other]} from.



----> this is in filters manual

You can customize the HTML in whatever way you like by using <a href="{LINKFILTERLINK[fieldname]}"><img src="{LINKFILTERIMAGE[fieldname]}" border="0"></a> instead of {LINKFILTER[fielname]}.
Damir
Forum Regular

Usergroup: Customer
Joined: Jan 25, 2005
Location: Croatia

Total Topics: 46
Total Comments: 136
Damir
Posted Apr 28, 2008 - 6:21 AM:

Paul wrote:
Changing now to add a second parameter to {LINKFILTER}.


What will be the second parametar? filtertype=contains?
Paul
developer

Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California

Total Topics: 61
Total Comments: 7868
Paul
#10 - Quote - Permalink
Posted Apr 29, 2008 - 5:19 AM:

Damir wrote:



----> this is in filters manual

You can customize the HTML in whatever way you like by using <a href="{LINKFILTERLINK[fieldname]}"><img src="{LINKFILTERIMAGE[fieldname]}" border="0"></a> instead of {LINKFILTER[fielname]}.


I see. Added second parameter there. It's described in advance in the KB:
Note that you can make numeric filters filter to <= instead of >= by using a filtertype=less parameter in a url. To filter between two numeric values, use filtertype=between and supply the filter value hyphen separated, like 100-200. To filter to any text that contains a term, use filtertype=contains. To filter to any text that is not equal to the specified text, use filtertype=not. You can pass the filter type as the second parameter to {LINKFILTERLINK}, like {LINKFILTERLINK[descripton <,> contains]}. It can also be passed to {FILTERLINK} as the third parameter, like {FILTERLINK[1 <,> description <,> contains]}.
Damir
Forum Regular

Usergroup: Customer
Joined: Jan 25, 2005
Location: Croatia

Total Topics: 46
Total Comments: 136
Damir
#11 - Quote - Permalink
Posted Apr 29, 2008 - 5:44 AM:

I beliewe that pagination is not working when using filters can you check that i think there is a error
Paul
developer

Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California

Total Topics: 61
Total Comments: 7868
Paul
#12 - Quote - Permalink
Posted May 02, 2008 - 4:41 AM:

Confirmed. There seem to be wider filter issues as well. Fixing.
Search thread for
Download thread as
  • 0/5
  • 1
  • 2
  • 3
  • 4
  • 5



Sorry, you don't have permission to post posts. Log in, or register if you haven't yet.