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 :
<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%>><%' ' 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>
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%>><%' ' 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>