Gossamer Forum
Home : Products : Gossamer Links : Development, Plugins and Globals :

Re: [rascal] Multiple Categories(How?)

Quote Reply
Re: [rascal] Multiple Categories(How?) In reply to
Hey Andy,

Maybe you can just tell me how to make it so that the first item in the category list shows as "Select Category" instead of showing the first actual category? Since I don't really want people submitting their listings to our "Articles" category and Articles being the first category in the list, chances are very high that people are listing in the Articles category by mistake instead of by choice. Seems it should be simple enough in a selection list to place a "Select Category" as the default selected item and if they try to sumbmit to the "select category" category I would think that Links would know that theres no such category and tell them to select a category instead of accepting the data, but even still if it doesn't, I'd accept that they get dumped in a non existant category if they chose "select category" as their chosen category.

I believe everything to do with the category list in the include_form template is :
Code:
<div class="row<%unless category_loop_selected%> required<%endunless%> clear">
<label for="CatLinks.CategoryID" class="name">Category:<%unless category_loop_selected%> <span>*</span><%if CatID == 75 or 78 or 79%><br>CHOOSE A SUBCATEGORY OF THE MEMBER PRICE LIST TO ADD YOUR SELL OR BUY LIST<%endif%><%endunless%></label>
<div class="value wrappedtext">
<%~if config.db_gen_category_list == 2%>
<script type="text/javascript" src="<%config.build_static_url%>/treecats.js"></script>
<%~set selected_cats = Links::Tools::category_list_selected%>
<%~loop selected_cats%>
<input type="hidden" name="CatLinks.CategoryID" value="<%escape_html ID%>" >
<%~endloop%>
<noscript>
<ul class="categories">
<%~loop selected_cats%>
<li><%Full_Name%></li>
<%~endloop%>
<%~if not selected_cats.length%>
<li><%Links::language('ADD_SELCAT')%></li>
<%~endif%>
</ul>
</noscript>
<div id="treecats"></div>
<script type="text/javascript">
var tc = new treecats({ <%-- selectionMode : 'multiple', --%> cgiURL : '<%config.db_cgi_url%>', imageURL : '<%config.build_static_url%>/<%t%>/images' });
tc.load();
</script>
<%~elsif category_loop_selected%>
<%~if category_loop.length > 1%>
<ul class="categories"><%loop category_loop%><li><%Full_Name%><input type="hidden" name="CatLinks.CategoryID" value="<%escape_html ID%>"></li><%endloop%></ul>
<%~else%>
<%loop category_loop%><%Full_Name%><input type="hidden" name="CatLinks.CategoryID" value="<%escape_html ID%>"><%endloop%>
<%~endif%>
<%~else%>
<select id="CatLinks.CategoryID" name="CatLinks.CategoryID" multiple="multiple" size="5">
<%~loop category_loop%>
<option value="<%escape_html ID%>"<%if selected%> selected="selected"<%endif%>><%'&nbsp;&nbsp;' x $CatDepth%><%Name%></option>
<%~endloop%>
</select><br><font color="red">CHOOSE <B>NO MORE THAN 3</B> FORMATS/CATEGORIES TO PLACE YOUR DECK LIST IN.</font>
<%~endif%>
</div></div>

Last edited by:

Westin: May 20, 2009, 6:29 AM
Subject Author Views Date
Thread Multiple Categories(How?) rascal 11016 May 2, 2005, 1:00 AM
Post Re: [rascal] Multiple Categories(How?)
rascal 10711 May 5, 2005, 9:48 PM
Thread Re: [rascal] Multiple Categories(How?)
brewt 10668 May 6, 2005, 12:59 PM
Thread Re: [brewt] Multiple Categories(How?)
Alba 10561 Jan 14, 2006, 8:44 AM
Thread Re: [Alba] Multiple Categories(How?)
Andy 10504 Jan 17, 2006, 3:53 AM
Thread Re: [Andy] Multiple Categories(How?)
webmaster33 10567 Jan 17, 2006, 3:57 AM
Post Re: [webmaster33] Multiple Categories(How?)
Alba 10462 Jan 17, 2006, 4:01 AM
Post Re: [webmaster33] Multiple Categories(How?)
brewt 10444 Jan 17, 2006, 1:21 PM
Post Re: [brewt] Multiple Categories(How?)
webmaster33 10512 Jan 17, 2006, 3:45 AM
Post Re: [brewt] Multiple Categories(How?)
yobo 10240 Mar 16, 2007, 9:40 AM
Thread Re: [brewt] Multiple Categories(How?)
terriz 10013 Mar 11, 2008, 2:45 PM
Thread Re: [terriz] Multiple Categories(How?)
Andy 10052 Mar 11, 2008, 2:50 PM
Thread Re: [Andy] Multiple Categories(How?)
terriz 9998 Mar 11, 2008, 2:58 PM
Post Re: [terriz] Multiple Categories(How?)
Andy 10033 Mar 11, 2008, 3:00 PM
Thread Re: [terriz] Multiple Categories(How?)
brewt 10038 Mar 11, 2008, 3:20 PM
Thread Re: [brewt] Multiple Categories(How?)
terriz 10001 Mar 11, 2008, 11:33 PM
Thread Re: [terriz] Multiple Categories(How?)
Gorospe 9993 Sep 22, 2008, 12:54 PM
Thread Re: [Gorospe] Multiple Categories(How?)
Andy 9996 Sep 22, 2008, 1:01 PM
Thread Re: [Andy] Multiple Categories(How?)
Gorospe 10048 Sep 22, 2008, 1:10 PM
Thread Re: [Gorospe] Multiple Categories(How?)
Andy 9939 Sep 22, 2008, 1:13 PM
Thread Re: [Andy] Multiple Categories(How?)
Gorospe 9922 Sep 22, 2008, 1:14 PM
Thread Re: [Gorospe] Multiple Categories(How?)
brewt 9930 Sep 22, 2008, 1:48 PM
Thread Re: [brewt] Multiple Categories(How?)
Gorospe 9949 Sep 22, 2008, 8:38 PM
Thread Re: [Gorospe] Multiple Categories(How?)
Andy 9930 Sep 23, 2008, 12:17 AM
Thread Re: [Andy] Multiple Categories(How?)
Westin 9685 May 20, 2009, 5:59 AM
Thread Re: [Westin] Multiple Categories(How?)
Andy 3522 May 20, 2009, 6:17 AM
Post Re: [Andy] Multiple Categories(How?)
Westin 3443 May 20, 2009, 6:22 AM
Thread Re: [rascal] Multiple Categories(How?)
Westin 3511 May 20, 2009, 6:27 AM
Thread Re: [Westin] Multiple Categories(How?)
Andy 3496 May 20, 2009, 6:36 AM
Thread Re: [Andy] Multiple Categories(How?)
Westin 3593 May 20, 2009, 6:39 AM
Thread Re: [Westin] Multiple Categories(How?)
Andy 3462 May 20, 2009, 6:44 AM
Post Re: [Andy] Multiple Categories(How?)
Westin 3437 May 20, 2009, 6:47 AM