I have created a custom link field named 'country' to serve for selecting the country/region for each website. I made it user-submittable, also I figured out how to display it with the links (added its variable to the template).
My goal is to be able to use this as a link filter through a dropdown box that should restrict links being desplayed to a particular country. Ive read some posts but couldnt make it work. I understand that I do need to add html code for dropdown boxes but other than the selector name (country) I do not know what options/values to use (as I'm not very familiar with html forms)and generally how to integrate this with the values/options I've added in the custom link field.
A small practical example here would be priceless.
I have created a custom link field (just for testing) named "coloristic" with the options: black,white,yellow,blue.
The field displays in the suggest link page and I've added a few links with different values (black, white,yellow)
I want to create a select box for the visitors to sort links by color. Following the example in the manual (Filters article) I added the code below to the displaylinks.tpl template. It displays correctly but doesnt do anything (well, nothing good). Can you please help me troubleshoot it. The URL being displayed when I use the filter is localhost/wsnlinks/index.ph...id=2&filter=coloristic (I've set it up to run locally for testing).
I think the manual article here is less self explanatory than for other articles so its not clear what goes where. For example is says: "To remove a filter you can use filtervalue=removefilter, and to remove all filters at once you can use filtervalue=removefilters." Where do these go?
This might sound dumb but can I have a multi select combo box as a field and use a simple dropdown box selector at the front end? I want to be able to select multiple option when I edit/add a new listing but to allow the users only one option.
If so what do I need to change within the code. I've tried it with the current code but it doesnt do anything.
Comments on Custom link field
Usergroup: Customer
Joined: Aug 02, 2005
Location: Romania
Total Topics: 19
Total Comments: 50
I have created a custom link field named 'country' to serve for selecting the country/region for each website. I made it user-submittable, also I figured out how to display it with the links (added its variable to the template).
My goal is to be able to use this as a link filter through a dropdown box that should restrict links being desplayed to a particular country. Ive read some posts but couldnt make it work.
I understand that I do need to add html code for dropdown boxes but other than the selector name (country) I do not know what options/values to use (as I'm not very familiar with html forms)and generally how to integrate this with the values/options I've added in the custom link field.
A small practical example here would be priceless.
Thank you.
developer
Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California
Total Topics: 61
Total Comments: 7868
What's wrong with the example in the manual? You'll have to explain. scripts.webmastersite.net/w...nks/wsnmanual/articles/201
Usergroup: Customer
Joined: Aug 02, 2005
Location: Romania
Total Topics: 19
Total Comments: 50
I guess its my mistake...I thought I read all articles in the manual related to fields; I missed that one.
That example seems to be exactly what I asked for.
Thanks once again..sorry for the trouble.
Usergroup: Customer
Joined: Aug 02, 2005
Location: Romania
Total Topics: 19
Total Comments: 50
I have created a custom link field (just for testing) named "coloristic" with the options: black,white,yellow,blue.
The field displays in the suggest link page and I've added a few links with different values (black, white,yellow)
I want to create a select box for the visitors to sort links by color. Following the example in the manual (Filters article) I added the code below to the displaylinks.tpl template. It displays correctly but doesnt do anything (well, nothing good). Can you please help me troubleshoot it. The URL being displayed when I use the filter is localhost/wsnlinks/index.ph...id=2&filter=coloristic (I've set it up to run locally for testing).
I think the manual article here is less self explanatory than for other articles so its not clear what goes where. For example is says: "To remove a filter you can use filtervalue=removefilter, and to remove all filters at once you can use filtervalue=removefilters." Where do these go?
developer
Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California
Total Topics: 61
Total Comments: 7868
Manual is missing the necessary &linkfilteraction=add (corrected now). Use
Usergroup: Customer
Joined: Aug 02, 2005
Location: Romania
Total Topics: 19
Total Comments: 50
Works just fine now...thanks for troubleshooting it.
Usergroup: Customer
Joined: Aug 02, 2005
Location: Romania
Total Topics: 19
Total Comments: 50
This might sound dumb but can I have a multi select combo box as a field and use a simple dropdown box selector at the front end? I want to be able to select multiple option when I edit/add a new listing but to allow the users only one option.
If so what do I need to change within the code. I've tried it with the current code but it doesnt do anything.
developer
Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California
Total Topics: 61
Total Comments: 7868
You can't set multiple filters at once.