Gossamer Forum
Home : Products : Gossamer Links : Discussions :

Change category when modifying link?

Quote Reply
Change category when modifying link?
When submitting links I have it set that you must be in the category you want to add your link too.

But when modifying a link you can't change the category, it just displays the category.

How can I have category select on the modify form only so the category can be changed?
Quote Reply
Re: [rascal] Change category when modifying link? In reply to
Anyone know how to do this?
Quote Reply
Re: [rascal] Change category when modifying link? In reply to
I suppose you could have 2 different include_form.html

In add.html use include_add_form.html and hard code the categories
.. save include_form.html as include_add_form.html
.. load add.cgi
.. copy the resulting category input from source code.
.. paste the category input, replacing the normal coding in include_add_form.html

In modify.html have include_form.html which is the original coding.

Of course you'd have to change include_add_form.html if you added/deleted categories.
Quote Reply
Re: [Alba] Change category when modifying link? In reply to
Thanks Alba,

You have been very helpful and I will have to do it that way for now.

GT ,could something be added to the admin in the next release to do this?

Last edited by:

rascal: Apr 29, 2006, 7:38 PM
Quote Reply
Re: [Alba] Change category when modifying link? In reply to
Or you can just modify the include_form.html to show the category drop down on the modify page (page_id eq modify).

Adrian
Quote Reply
Re: [brewt] Change category when modifying link? In reply to
Brewt,

Could you provide some instruction to do this properly, I hard coded the category drop down in the include_form and used pageid_modify and all is working but the category drop down does not show what category the link is in.
Quote Reply
Re: [rascal] Change category when modifying link? In reply to
Or you can just modify the include_form.html to show the category drop down on the modify page (page_id eq modify).

Adrian

<div class="row required clear<%unless category_loop_selected%> required<%endunless%> clear">
<label for="CatLinks.CategoryID" class="name">Category: <%unless category_loop_selected%> <span>*</span><%endunless%></label>
<div class="value<%if category_loop_selected%> wrappedtext<%endif%>">
<%if category_loop_selected%>
<%if category_loop.length > 1%>
<ul><%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">
<%loop category_loop%>
<option value="<%escape_html ID%>"<%if selected%> selected="selected"<%endif%>><%'&nbsp;&nbsp;' x $CatDepth%><%Name%></option>
<%endloop%>
</select>
<%endif%>
</div>
</div>


What change to the above code to I have to make?
Quote Reply
Re: [rascal] Change category when modifying link? In reply to
Anyone?
Quote Reply
Re: [rascal] Change category when modifying link? In reply to
NEVERMIND, HAD TO PAY TO GET THIS DONE!

THANKS FOR HELPING OUT G.T.!!!