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 12793 May 2, 2005, 1:00 AM
Post Re: [rascal] Multiple Categories(How?)
rascal 12480 May 5, 2005, 9:48 PM
Thread Re: [rascal] Multiple Categories(How?)
brewt 12428 May 6, 2005, 12:59 PM
Thread Re: [brewt] Multiple Categories(How?)
Alba 12319 Jan 14, 2006, 8:44 AM
Thread Re: [Alba] Multiple Categories(How?)
Andy 12266 Jan 17, 2006, 3:53 AM
Thread Re: [Andy] Multiple Categories(How?)
webmaster33 12328 Jan 17, 2006, 3:57 AM
Post Re: [webmaster33] Multiple Categories(How?)
Alba 12210 Jan 17, 2006, 4:01 AM
Post Re: [webmaster33] Multiple Categories(How?)
brewt 12188 Jan 17, 2006, 1:21 PM
Post Re: [brewt] Multiple Categories(How?)
webmaster33 12263 Jan 17, 2006, 3:45 AM
Post Re: [brewt] Multiple Categories(How?)
yobo 11986 Mar 16, 2007, 9:40 AM
Thread Re: [brewt] Multiple Categories(How?)
terriz 11771 Mar 11, 2008, 2:45 PM
Thread Re: [terriz] Multiple Categories(How?)
Andy 11819 Mar 11, 2008, 2:50 PM
Thread Re: [Andy] Multiple Categories(How?)
terriz 11769 Mar 11, 2008, 2:58 PM
Post Re: [terriz] Multiple Categories(How?)
Andy 11781 Mar 11, 2008, 3:00 PM
Thread Re: [terriz] Multiple Categories(How?)
brewt 11797 Mar 11, 2008, 3:20 PM
Thread Re: [brewt] Multiple Categories(How?)
terriz 11755 Mar 11, 2008, 11:33 PM
Thread Re: [terriz] Multiple Categories(How?)
Gorospe 11749 Sep 22, 2008, 12:54 PM
Thread Re: [Gorospe] Multiple Categories(How?)
Andy 11760 Sep 22, 2008, 1:01 PM
Thread Re: [Andy] Multiple Categories(How?)
Gorospe 11808 Sep 22, 2008, 1:10 PM
Thread Re: [Gorospe] Multiple Categories(How?)
Andy 11701 Sep 22, 2008, 1:13 PM
Thread Re: [Andy] Multiple Categories(How?)
Gorospe 11680 Sep 22, 2008, 1:14 PM
Thread Re: [Gorospe] Multiple Categories(How?)
brewt 11684 Sep 22, 2008, 1:48 PM
Thread Re: [brewt] Multiple Categories(How?)
Gorospe 11701 Sep 22, 2008, 8:38 PM
Thread Re: [Gorospe] Multiple Categories(How?)
Andy 11686 Sep 23, 2008, 12:17 AM
Thread Re: [Andy] Multiple Categories(How?)
Westin 11446 May 20, 2009, 5:59 AM
Thread Re: [Westin] Multiple Categories(How?)
Andy 4138 May 20, 2009, 6:17 AM
Post Re: [Andy] Multiple Categories(How?)
Westin 4048 May 20, 2009, 6:22 AM
Thread Re: [rascal] Multiple Categories(How?)
Westin 4119 May 20, 2009, 6:27 AM
Thread Re: [Westin] Multiple Categories(How?)
Andy 4107 May 20, 2009, 6:36 AM
Thread Re: [Andy] Multiple Categories(How?)
Westin 4207 May 20, 2009, 6:39 AM
Thread Re: [Westin] Multiple Categories(How?)
Andy 4076 May 20, 2009, 6:44 AM
Post Re: [Andy] Multiple Categories(How?)
Westin 4035 May 20, 2009, 6:47 AM