HELP! Trying to figure out how to build a "Leadership Team" page

Permalink 1 user found helpful
Hi,

I think I'm in over my head here, but I'm hoping someone here can help point me in the right direction.

I need to build a page for displaying a company's "Leadership Team" (see attached image for layout). It will have good-sized thumbnails of each team member in a row across the top, with their names & titles beneath. The bottom portion of the page will display more detail about the selected team member. When a new team member's thumbnail is clicked, the lower portion will be replaced with their information (ideally using some nifty jQuery animation(s) to make it look all purdy, LOL!).

I was thinking I would use Jordan Lev's Designer Content Add-On in order to be able to design a new block to capture all the pertinent details for each team member (name, title, profile pic, bio, and their "quote") so that I could wrap each one in the pertinent code. Then insert as many of those blocks as needed on a custom page type that would have any/all of the rest of the needed code to generate the effect. This way, it would make it more "intuitive" for the client to just come and edit this page: add/edit/delete team members, re-order them on-page, etc.

I was looking at existing jQuery plugins for things like sliders (like the Sliding Tabs jQuery plugin: http://www.kristiandre.net/slidingtabs/... ) and/or tab interfaces (like this one:http://tinyurl.com/7nu56eb ), thinking I could style them with CSS to make them look the way I want...

... but all of them have two separate sections: one for the navigation links (usually an un-ordered list) and the other a section containing div's with the content to be displayed. So if I go the route I'm planning, I'm guessing that would mean my view.php for my custom page type would need to iterate through each of the blocks on the page to generate the on-page navigational UL struction... which is where smoke starts coming out of my ears! LOL!

Oh... and, ideally, if the individual sections of content could add a hashtag to the URL so that they could be individually linked to (like Chris Coyier's "Anything Slider" described here: http://css-tricks.com/3412-anythingslider-jquery-plugin/... ), that would be sweet, too! (why not ask for EVERYTHING, right?!?!)

Am I heading in the right direction? Can someone point me somewhere (anywhere?) to get started?

Thanks!

1 Attachment

arrestingdevelopment
 
arrestingdevelopment replied on at Permalink Reply
arrestingdevelopment
OK... maybe if I start small... I'm pretty good at dissecting things and re-purposing them.

So, can someone point me to somewhere that would help me understand how I could iterate through a list of all of the blocks on a page?

Thanks!
C5LABS replied on at Permalink Reply
C5LABS
honestly, this is going to be a lot of work and you may be better off posting something like this in the jobs forum, but depends on your can do attitude and level of skill to get blocks in the current page, do
$page = Page::getCurrentPage();
   $blocks = $page->getBlocks('Main');

fromhttp://www.concrete5.org/documentation/developers/blocks/working-wi...

I would probably do a separate editable area for the bio pieces and then load content into a new area with jquery when a link in the bio pieces is clicked. Something like this
$('.bio-link').click(function() {
 document.getElementById('#full-bio-display').innerHTML=content;//content is the bio info that you want to load in
});

But again, it really depends on your jquery/js experience- this isn't going to be a lot of php.
arrestingdevelopment replied on at Permalink Reply
arrestingdevelopment
C5Labs,

Thanks for that starter. You're right... this probably is a good candidate for hiring out. I generally have a "can do" attitude, though, and often find it hard to let go of a "juicy" coding opportunity! LOL! I may be sorry.

I was also thinking I could do it with separate pages (make each team member their own page, then use a modified/enhanced PageList block to pull the pertinent info into the "parent" page to display... but I thought it would make more sense for the client to manage all of the content on the same page. We'll see.

And I'm usually pretty good with jQuery... and getting it to do what I want (either with simple coding or stringing together some plugins, etc), so your second idea might be easier for me. Add individual blocks for each team member to the page. Then use the "view.php" file to design how they appear as the "thumbnail" block at the top of the page and use jQuery to display their content into the lower half of the page when clicked. Could work.

Thanks! I'm off to see if I can expand on the blocks code you gave. I'm sure I'll be back, posting more questions. LOL!
Shotster replied on at Permalink Reply
Shotster
It's not clear to me why you would create a custom block to get what C5 already provides. C5 has powerful user, user attribute, and group functionality that you could use for your leadership team. Granted, the dashboard UI for managing users and groups is not as friendly as it could be, but making use of C5's users and groups seems ideally suited to the task. Create a "Leadership Team" group, create as many user attributes as you need to store the data that you want to associate with each user, utilize avatars for each member's thumbnail picture, etc.

Once you've got that thought through and some user data entered into the system, THEN turn your attention to presentation - i.e. how to display that info on a web page. There are a number of approaches you could take in that regard and some add-ons that might help.

-Steve
arrestingdevelopment replied on at Permalink Reply
arrestingdevelopment
Steve,

Well... the fact that this is called the "Leadership Team" page may be a bit misleading, since none of the listed people will be "users" of the site, etc. It's a corporate site, being maintained by just a couple of people. The President and his other upper-level management won't be users of the site.

Good idea, though... and it could still end up being a good way to go after I bloody my head trying the other approach. LOL!

Thanks!

- John
Shotster replied on at Permalink Reply
Shotster


> Well... the fact that this is called the "Leadership Team" page may be a bit misleading,
> since none of the listed people will be "users" of the site, etc. It's a corporate site,
> being maintained by just a couple of people. The President and his other upper-level
> management won't be users of the site.

Hi John,

I think you're taking the term "user" too literally. They don't have to be provided with their log-in credentials. They don't even have to be aware that they have an "account" on the system. All that's needed to enter someone into the DB is an email address and a user name. Think of C5 as having a powerful "people" database. People can be entered into the DB, have any number and type of custom properties (attributes) associated with them, and be placed into any number of groups. C5 has lots of built-in methods and functionality for manipulating (filtering, sorting, etc.) users and groups which can simplify your code and make your life easier instead of duplicating built-in functionality.

At the risk of sounding like I'm hawking my wares, if C5's user DB is exploited, then installing my add-on...

http://www.concrete5.org/marketplace/addons/enhanced-user-list/...

...would allow you to focus on simply creating and styling a custom view template and adding some JS for whatever display effects you want - i.e. you wouldn't have to touch any PHP. In a matter of minutes, you could be focusing on CSS and JS. But even without my add-on, writing a bit of PHP code to pull out the user data is FAR simpler than creating a custom block.

Using C5's user DB would be more flexible as well. For instance, if the client requests at some point down the road that some additional information be displayed about each team leader, you'll have to modify your DB schema, update and redeploy your custom block, etc., whereas using built-in functionality, a new attribute could be created and each user updated through the UI in a matter of minutes.

That said, I can totally understand the desire for something other than the dashboard UI for entering user data. In that case, just have the site admins log in as each person to edit their profile. Anyway, just some things to consider...

Regards,

-Steve
jeckerman replied on at Permalink Reply
jeckerman
I threw together a quick slider for you, you'll have to fine tune the spacing and colors. But hope it helps.

http://ux.jeckerman.com/pslide/...

- Josh
arrestingdevelopment replied on at Permalink Reply
arrestingdevelopment
Awesome! Thanks, Josh! That was really nice of you to take the time to do that!

I see you used jQueryTools (http://flowplayer.org/tools/index.html... ). Looks pretty sweet! I remember reading about it a while ago, but it was still new and I didn't know how robust it was going to be, etc. But taking a closer look, it looks pretty amazing.

Have you used the jQueryTools stuff much? If so, I'd be interested to hear your take on them (ease-of-use, speed, etc.)... although maybe that should be it's own thread. LOL!

Thanks again!

- John
jeckerman replied on at Permalink Reply
jeckerman
No problem at all, hope it helps. I really like jQueryTools, quality widgets/code, and so clean to implement. I think I've used almost every feature they have, and really like how easy it is to style.

- Josh
jordanlev replied on at Permalink Reply
jordanlev
I personally have had terrible experience with jQueryTools. I used it to build a scrollable playlist of video thumbnails for flowplayer, because I figured if the flowplayer people made it then it would have been designed to work with flowplayer -- but no, it caused a ridiculous amount of problems and didn't interact well with flowplayer at all. In the end, I would have been way better off using one of the sliders I'm already familiar with. Maybe if you're not using it with flowplayer it's fine, though.

I personally am a big fan of PlusSlider --https://github.com/JamyGolden/PlusSlider... -- it is very cross-browser compatible (even IE6), simple, and really easy to customize (it's basically designed to be used as a bare-bones starting point for developers who have their own custom style).
jeckerman replied on at Permalink Reply
jeckerman
Thanks for the heads up on PlusSlider, something that I've wanted for awhile, a well thought slider, but barebones that I can customize.

You know I had issues as well with FlowPlayer and jQuery Tools, and since I was more fond of FlowPlayer, I went with a from scratch accordion solution for the display and hiding the FlowPlayers. I still use it however, but like anything I'm not a fanboy of it, I use it whatever works best for the project. Lately I've been digging into Dojo a lot more.

Okay, I'm off to play with this new found slider.

- Josh
Shotster replied on at Permalink Reply
Shotster
I sorta missed the fact that you'd be using the Designer Content block, so maybe creating and updating the block won't be quite as painful as I thought, but I still think the user DB is worth considering.

-Steve
arrestingdevelopment replied on at Permalink Reply
arrestingdevelopment
Point well-taken, Steve. And, honestly, you're probably right. It sounds like it wouldn't be all that difficult to do using "users" in the system and adding the necessary attributes to flush them out.

But I think I want to try and stick to the current plan IF I can (big, Big, BIG "if" there... LOL!). But it's great to hear other people's perspective on how THEY might go about implementing this... opens eyes, provides options, etc.

Thanks a lot!

- John
Shotster replied on at Permalink Reply
Shotster
No problem, John. I guess part of the reason I am suggesting the approach I am is because It sounds similar to a scenario I encountered regarding a small organization's board members.

A couple months after implementing the site, I was approached about creating some custom forms and reports for the board. The client was not necessarily thinking in terms of the website for that information, but because I had entered the board into the system as users, I was able to easily create a node of the site tree and use advanced permissions to provide access to those pages only by the "Board Members" group. The client was quite pleased. And because board members come and go, it's simple to add/remove users to/from that group. So, it turned out to be a forward thinking and flexible approach that "goes with the grain of C5" as jordanlev put it.

Anyway, good luck with it.

-Steve
arrestingdevelopment replied on at Permalink Reply
arrestingdevelopment
Another great point. And probably one I'll be smacking myself on the head for 6 months from now if I go a different route! :D

Thanks for explaining more. If nothing else, it helps me to learn more by understanding how OTHER developers are using the system.

- John
jordanlev replied on at Permalink Reply
jordanlev
If I were building this, I would first make it work without any ajax, just separate pages for each person. I understand your concern about wanting to make it as easy to edit as possible, but to me I look at working with pages as the foundation of C5's architecture, so if someone is going to be using C5 they should really understand that things revolve around pages, and you can give them instructions like "To add a new leadership team member, navigate to the top-level leadership team page, click the Add Page button, and choose the Leadership page type". You as the developer would set up custom attributes on the Leadership page type so that the user would be prompted to enter the proper meta-data when they add the page. If you're worried that they'll add a page too far deep into the sitemap hierarchy (as I usually am, because I do it myself all the time by accident), you can use the "Force Single Sublevel" addon which I created to address this very issue (http://www.concrete5.org/marketplace/addons/force-single-sublevel/... ).

I feel that Concrete5 has a certain "grain" (like the grain of wood) and it's always best to try to go along with that when possible, because it will make your life as the developer easier, and also enable more robust interactions with other addons and blocks and future improvements to the system, because you're working within that system and not creating some alternate system outside of that. Of course there are situations where you do need to go super highly custom, but in my opinion this situation you have isn't one of them.

Another way to look at it is that each page in the sitemap is a "record of data", and the sitemap itself becomes a tool for managing the data. Want to add a new "record"? Click "Add Page". Want to delete a "record"? Delete the page. Want to change the order of records? Drag and drop in the dashboard sitemap. It's not the perfect user interface for every situation, but it has the humungous advantage of being free functionality for you as the developer, and one more thing you don't need to build yourself (and test yourself and maintain yourself and bugfix yourself). Another huge win is this ties into the built-in search system perfectly -- if each person or record or whatever is a page, then there is a destination for search results to point to -- and again, this comes out of the box for free without you having to write custom code.

So... all that being said, I would make a custom template for the page list block that shows the thumbnails at the top. This would pull custom attributes from each "Leadership" page (or, it could pull content from the page itself using various techniques). Then the page content is the lower portion of the page, and that's the individual person's info.

Once you have that working, you can look to ajaxifying this more -- but the key here is that you are ajaxifying it for people to view it on the front-end, not to make it a different editing experience on the back-end (because, as I explained earlier, I think it's better to have people manage content on a per-page basis). So make one top-level page, put the page list with the custom template on it, and throw some jquery into the page list custom template so that when someone clicks a person, it grabs content from the appropriate leadership page and displays it in a div on the lower part of the screen. You'll want to create a "tools" file to receive the ajax request (and the request should have the cID of the leadership person's page as a querystring argument), and in that tools file you can grab the cID for the appropriate person, retrieve the "Main" area (or whatever) from that page and display it.

If you want specific code samples for any of this, let me know.

Jeez... I can't believe I just wrote all that -- you got me on my favorite topic :)
Hope it helps.

-Jordan
jeckerman replied on at Permalink Reply
jeckerman
No more coffee for you at 3am at night. :-)

- Josh
jordanlev replied on at Permalink Reply
jordanlev
West coast -- this is my midnight snack. Or something to put me to sleep :)
arrestingdevelopment replied on at Permalink Reply
arrestingdevelopment
Glad to hear that this kind of thing relaxes you! There's hope that I'll get there someday, too, then! ;D
arrestingdevelopment replied on at Permalink Reply
arrestingdevelopment
Jordan,

Thanks for such a detailed post. This really does help to "expand my horizons" in the direction of staying with "the grain" of C5's core functionality.

I really LIKE the idea of using a custom page type with the appropriate attributes and content to be able to utilize the existing Page List block with a custom template. There IS a programmatic elegance to it. But I still can't help but think that for an end-user, if I'm looking at the page that's displaying all of the members of the Leadership Team, it makes the most sense to be able to edit it all right there. Maybe it's my years as a Systems Analyst, interfacing between programmers and business users. Or maybe it's just this specific customer that has me thinking this way. Sure they can be trained. But it seems like I'd be training them against THEIR "grain".

Up to now, I've been looking at jQuery plugins like the jQueryTools Tabs features, etc.. And all of them require two separate, interconnected sections of code: one for the navigational links (usually a UL structure, but some allow greater leeway) and one for the DIV's of content to be displayed. So... that's where my brain began smoking. I knew I could create a custom block to gather all of the info about the user... and I was thinking that this block would be used in the lower portion: creating the DIVs of content to be rotated through. Of course, this mindset then meant that I needed to have a programmatic way to dynamically loop through each instance of that block type on the page, gather the pertinent info, and build the navigational structure for the top of the page.

But you and C5Labs and Shotster have me thinking along new lines... to use the blocks to build the thumbnail nav links... and then jQuery to display the content below! Seems much more doable! And, actually, I would probably have the default styling show the blocks vertically, styled like the lower half of the page. So that if javascript was turned off, the content would display just fine. Then use the jQuery to apply new styles that display the blocks as thumbnails and auto-magically populates a heretofore empty DIV below them with their full content when clicked.

Seems WAY more doable... if only I could summon the courage to actually start coding it!

LOL!

Again... thanks for your help (ALL of you!). I really appreciate all of the input!

- John (still procrastinating)