Using the file manager in the dashboard
PermalinkI'm building a company website and I followed Andrew Emblers tutorial onhttp://andrewembler.com/posts/build-a-single-page-powered-editing-i... to create a way to add employees to the site. I would like to be able to add an image to the employees using the Concrete5 image manager, but I can't seem to find anything about it on the internet. Could someone help me out, and point me in the right direction?
Thanks,
Ronald

I now did it using ccm_activateFileSelectors() and a callback function.
Perhaps I'm not completely understanding what you want to do, but why not just use the functionality that already exists in the dashboard for adding and grouping users? I mean, that's precisely what it's for. Granted, the UI is not the most efficient or intuitive, but it works, and you can add avatars for each employee to serve as their "staff picture." That's what I've done in the past.
You could then use something like the following add-on to list users anywhere on your site...
http://www.concrete5.org/marketplace/addons/enhanced-user-list/...
And if you need any other data (such as an additional picture) associated with each employee, then user attributes are the way to go.
Just a suggestion. Please clarify if I'm not understanding.
-Steve
Thanks for your answer. But I don't want the end users of the website messing around in the users and groups. I want to keep it as simple as possible for them. That's why I also don't want them to use the sitemap to add employees. It's not very intuitive to think of employees as pages and I'm sure it will confuse them too much.
So I liked the tutorial by Andrew Embler. It's just what I want. It's just a little harder with the images.
Also I have another question. I should start a new topic, I know, but I'm here anyway and maybe one of you guys knows the answer: How can I make relations between pages? I want to connect an employee to every 'normal' page. Seems like a very basic property of any cms to me. But, and I find that very strange, I can't find an attribute that can do that.
> I want to keep it as simple as possible for them.
I certainly agree that the existing UI for adding and editing users and groups leaves much to be desired. (Perhaps that's part of the dashboard "rethink" that Franz has in mind for the next major release of C5?)
> That's why I also don't want them to use the sitemap to add employees. It's not very
> intuitive to think of employees as pages and I'm sure it will confuse them too much.
That is where I'm getting confused. I can't imagine why anyone would want to add employees as separate pages. C5 already has a powerful system for storing and managing users and groups. If you don't like the editing UI, then by all means, look into creating your own; but I hope you're not saying that you intend to create your own custom UI for adding employees as pages. I'm still not entirely clear on what you're trying to accomplish.
If you can clarify your intentions, then perhaps those of us in the community can provide some additional guidance.
-Steve
Since these employees don't have their own detail page on the frontsite of the website, I can't let the end user use the frontsite ui with the inline content editing to add or edit an employee. So I just want to follow the tutorial and create a new area in the dashboard where the employees can be added and edited, just like Andrew did in his tutorial.
I hope this clarifies what I want a little more.
You might actually find this add-on worth checking out:
http://www.concrete5.org/marketplace/addons/contact-directory/...
It lets you upload contact records and edit/add them individual (or modify them in bulk) and place a search interface to those directories on the front-end of your website. I believe you can also specify images for these people as well.
And I do agree with you – we do like using pages and custom attributes to store bits of data, but this really only makes a lot of sense when the stuff you're trying to work with is, in fact, page-based data.
I'll look into the link you posted later. (I'm getting really tired now :-))
But it's not only about contacts. We decided to use Concrete5 for the websites we are making at our company. We are now working on our first projects with it, so we are still learning how to best implement things. And in the past we had lots of custom content types that needed an image, and there's no reason to think that this will be different in the future.
The page and attributes idea works fine for me, because it's really easy to use not only in the front end but also in custom code at the back end. I made something for the images that seems to work fine, but I thought there would have been people trying to do the same, so there would have been some solutions.
Perhaps I'll post a small tutorial to show how I've done it when I'm satisfied with it.