Separate category groups in SAEF?
Posted: 15 July 2007 06:07 PM   [ Ignore ]  
Research Assistant
Avatar
RankRankRank
Total Posts:  418
Joined  12-15-2005

I have a weblog to which there are attached two separate category groups. In my SAEF (which is broken across 2 pages) I’m trying to provide users with the ability to use one dropdown to select categories from category group #1, and another one to choose categories from group #2. Is this possible? I’m thinking that they would need to be merged before submission at some point or…?

 Signature 

System Info: Production

EE Version:  1.66
Build
:       20081114
PHP Version
: 5.2.5

Profile
 
 
Posted: 26 August 2007 04:46 PM   [ Ignore ]   [ # 1 ]  
Summer Student
Total Posts:  17
Joined  04-17-2007

i need to do this exact same thing… any help guys?

Profile
 
 
Posted: 27 August 2007 10:27 AM   [ Ignore ]   [ # 2 ]  
Moderator
Avatar
RankRankRankRankRankRankRank
Total Posts:  23485
Joined  05-20-2002

I haven’t tried it- but what if you hard code two dropdowns, each with category[] ?  Does that work- I’d think it would.

 Signature 

AKA rob1

Help Request TipsPro Network

Profile
 
 
Posted: 27 August 2007 10:53 AM   [ Ignore ]   [ # 3 ]  
Summer Student
Total Posts:  17
Joined  04-17-2007

well of gives you to drop downs but they are identical and contain a blended alphebetized list of both category groups.  I need the two groups to be separate.

Profile
 
 
Posted: 27 August 2007 11:26 AM   [ Ignore ]   [ # 4 ]  
Moderator
Avatar
RankRankRankRankRankRankRank
Total Posts:  23485
Joined  05-20-2002

No- I mean hard code them rather than use the {category_menu} tags- so:

<p>Categories |<br />
<
select name="category[]" size="4" multiple="multiple">
<
option value='16'>Aug. 20-26</option>
<
option value='17'>Aug. 27-30</option>
<
option value='19'>June 12-18, 2005</option>
</
select>

<
p>Categories II<br />
<
select name="category[]" size="4" multiple="multiple">
<
option value='7'>Extensions</option>
<
option value='6'>Modules</option>
<
option value='5'>Plugins</option>
</
select>


Replacing it with your options, of course.  If it works hard coded, then you can use queries or something to dynamically populate each select- as needed.  But try hard coding it first- you can rip the options off of the rendered code from the tag- just put the two groups each in their own select.

Won’t swear it will work, but can’t see why not.

 Signature 

AKA rob1

Help Request TipsPro Network

Profile
 
 
Posted: 27 August 2007 12:22 PM   [ Ignore ]   [ # 5 ]  
Summer Student
Total Posts:  17
Joined  04-17-2007

oh, i see what you mean…but unfortunately I’d need the options to be fairly dynamic.  See, one category group would be for mobile carriers (ie: sprint, tmobile, nextel) and the other group would be for manufacturers (ie: nokia, motorola, panatec).  I’d need the ability for them to add new manufacturers from the front end as they saw fit.

Profile
 
 
Posted: 28 August 2007 08:51 AM   [ Ignore ]   [ # 6 ]  
Moderator
Avatar
RankRankRankRankRankRankRank
Total Posts:  23485
Joined  05-20-2002

If it works?  Then it should be fairly easy to dynamically populate the select options.  Well- it gets tricky if you have a bunch of subcats that need formatting.  But populating a straight list of options dynamically is definitely doable.

 Signature 

AKA rob1

Help Request TipsPro Network

Profile
 
 
Posted: 03 September 2007 09:08 AM   [ Ignore ]   [ # 7 ]  
Research Assistant
RankRankRank
Total Posts:  592
Joined  10-22-2006

Here’s an easy example for 3 hardcoded category groups that display seperately in the SAEF.

<table><tr><td>

<
p>Categories<br />
<
select name="category[]" size="6" multiple="multiple">
{exp:weblog:categories weblog="directory" category_group="2" style="linear"}
<option value="{category_id}">{category_name}</option>
{/exp:weblog:categories}
</select>
</
p>

</
td><td>

<
p>Operating System<br />
<
select name="category[]" size="6" multiple="multiple">
{exp:weblog:categories weblog="directory" category_group="3" style="linear"}
<option value="{category_id}">{category_name}</option>
{/exp:weblog:categories}
</select>
</
p>

</
td><td>

<
p>Game Modes<br />
<
select name="category[]" size="6" multiple="multiple">
{exp:weblog:categories weblog="directory" category_group="4" style="linear"}
<option value="{category_id}">{category_name}</option>
{/exp:weblog:categories}
</select>
</
p>

</
td></tr></table>

Now if you want nesting subcategories in that select-boxes (which I do unfortunately) you’re up for some serious thinking it seems…

Profile
 
 
Posted: 04 September 2007 05:38 AM   [ Ignore ]   [ # 8 ]  
Research Assistant
RankRankRank
Total Posts:  592
Joined  10-22-2006

I came up with a solution to indent the subcategories in this scenario.

Perhaps it’s helpful to anyone else.

Profile
 
 
   
 
 
Post Marker Legend
New Topic New posts Hot Topic Hot Topic with new posts New Poll New Poll Moved Topic Moved Topic Sticky Topic Sticky topic
Old Topic No new posts Hot Old Topic Hot Topic with no new posts Old Poll Old Poll Closed Topic Closed Topic Announcement Announcements
Theme
Change Theme
Visitor Statistics
The most visitors ever was 1149, on July 16, 2007 09:33 AM
Total Registered Members: 64549 Total Logged-in Users: 31
Total Topics: 81142 Total Anonymous Users: 21
Total Replies: 436544 Total Guests: 160
Total Posts: 517686    
Members ( View Memberlist )