Home | Products | Consulting | Forums | Support | Order | 1-800-752-0455
  Main
Index
Search
Posts
Who's
Online
Log
In

Home: Products: CMS Builder:
alphabetical order

 

 


grauchut
User

Mar 27, 2008, 3:21 AM

Post #1 of 5 (323 views)
Shortcut
alphabetical order Can't Post

Dave,

Is there a way I can have my clients update these pages. http://www.lawntonfire.com/members.php. I will need them to go in alphabetical order. Some members have profiles which I can set up cms for them to update. I just wanted to know if there is a way to make them post alphabetical order. Thanks Glenn
Glenn Rauchut (Owner) Emergency Designz


Dave
Staff / Moderator


Mar 27, 2008, 10:22 AM

Post #2 of 5 (311 views)
Shortcut
Re: [grauchut] alphabetical order [In reply to] Can't Post

Absolutely. You can set them to sort in alphabetical order with the orderBy option in the list viewer like this:

$options['orderBy'] = 'name';

What I would do is create a section for "members" and have fields for "group" (which would be a pulldown Line Officers, etc), name, and so on. The make that page a list viewer and sort by name then group like this:

$options['orderBy'] = 'name, group';

Then here's the trick. Call the "foreach listrows" code multiple times, having each time just show one group. Like this:


Code
<h1>Line Officers</h1> 
<?php foreach ($listRows as $record): ?>
<?php if ($record['group'] != "Line Officers") { continue; } ?>
Name: <?php echo $record['name'] ?><br/>
Title: <?php echo $record['title'] ?><br/>
<br/><br/>
<?php endforeach ?>

<h1>Executive Officers</h1>
<?php foreach ($listRows as $record): ?>
<?php if ($record['group'] != "Executive Officers") { continue; } ?>
Name: <?php echo $record['name'] ?><br/>
Title: <?php echo $record['title'] ?><br/>
<br/><br/>
<?php endforeach ?>


That will also let you format each group differently if you want.

Hope that helps. Let me know how it goes.

Dave Edis - Senior Developer
interactivetools.com


grauchut
User

Mar 27, 2008, 6:03 PM

Post #3 of 5 (299 views)
Shortcut
Re: [Dave] alphabetical order [In reply to] Can't Post

Dave,

I am a little confused with this. "What I would do is create a section for "members" and have fields for "group" (which would be a pulldown Line Officers, etc), name, and so on". Do I need to create different menu for each: Members, Officers, Etc. Also everyone has an email account that is posted with their profile. Is it possible to get this set up when you click on the name it opens like any other link for an email address? Thanks Glenn
Glenn Rauchut (Owner) Emergency Designz


grauchut
User

Mar 27, 2008, 6:13 PM

Post #4 of 5 (295 views)
Shortcut
Re: [grauchut] alphabetical order [In reply to] Can't Post

Dave,

Also the link I included in the first post. Is there a way to make it the same way. Where the names and titles are laid out and you can click on their name to see their profile. Thanks Again Glenn
Glenn Rauchut (Owner) Emergency Designz


Dave
Staff / Moderator


Mar 28, 2008, 10:15 AM

Post #5 of 5 (287 views)
Shortcut
Re: [grauchut] alphabetical order [In reply to] Can't Post

Yes, it would be one section, and you can have the emails open up when you click on them. Just take it one step at a time.

Start by creating a new section editor with fields for: group, name, title, and email

Then enter a few test records.

Then get your basic list page working (just copy and paste the code).

Then try and get them to display in groups like I showed in my post above.

Once you get that far let me know (or let me know if you need help) and then we can work on the columns and linking up the emails.

Hope that helps!

Dave Edis - Senior Developer
interactivetools.com

 
 
 


Search for (options)
Products
CMS Builder
Article Manager
Realty Manager
Listings Manager
Order Now
Services
Priority Consulting
Support
Online Documentation
Support Forums
Support Homepage
Company Info
12 reasons to choose us!
Meet the team
Monthly newsletter
Contact Us
Toll Free: 1-800-752-0455
Phone: (604) 689-3347
Sales | Support
Conditions of Use | Privacy Policy | Copyright © interactivetools.com 2008
#201 - 2730 Commercial Drive, Vancouver BC Canada V5N 5P4