Multiple images for a weblog
Posted: 07 May 2008 03:13 PM   [ Ignore ]  
Research Assistant
Avatar
RankRankRank
Total Posts:  887
Joined  02-15-2008

Hi all - lets say you have a weblog and you decide that weblog can have 6 images assigned to it. I’ve just done this, and I created 6 custom weblog fields which each were labelled ‘image 1’, ‘image 2’ etc. Obviously the downside here is that I’m restricted to 6 images unless I add more custom fields.

Has anyone else done something similar to this, and if so what technique did you use? I’m considering a seperate weblog to hold images for another weblog, and then related to each other, which will allow me to add unlimited images.

Just wondering if there are other ways I’m overlooking really. I seem to be having this requirement in quite a few projects so a better way would be cool.

 Signature 

Andy Harris | Pepper Digital | Malvern, UK | Twitter | New to ExpressionEngine? Start here!
Remember - If at first you don’t succeed, you’re not Chuck Norris

Profile
 
 
Posted: 07 May 2008 06:57 PM   [ Ignore ]   [ # 1 ]  
Research Assistant
Avatar
RankRankRank
Total Posts:  374
Joined  02-26-2008

I’ve done/am doing this on two projects in two different ways.

In the first project I did it the way you describe with related entries.  This approach fits the workflow model for that particular site as images arent’t always going to be added at the initial time of posting.

In the second project, the client/author needed a way to upload an unlimited amount of images (could be no images, could be 20).  So, I just created one custom field for images (textarea).  The client then adds all the images (via the standard upload utility) into that custom field.  I then wrote a plugin that would parse just that field and spit out all the images in an unordered list so that I could style them with CSS.  The plugin is very specific to that site but wasn’t hard to do.

So, it really depends on 1) the workflow and 2) the display.  If you need to place the images in different spots, then it might be better to use 6 different fields.  If they’re all added together, the way I did it might work for you.

Profile
 
 
Posted: 07 May 2008 07:11 PM   [ Ignore ]   [ # 2 ]  
Research Scientist
Avatar
RankRankRankRankRankRank
Total Posts:  6610
Joined  04-15-2006

Hi Andy,

There’s a few ways you can go about this one. You can use related entries as you have already stated or a plugin as mentioned above. There is one here that may help you out. Also don’t forget the excellent Multi Text extension by Mark Huot which pretty much would allow you to keep on creating fields one after the other in the control panel whenever you need new ones.

Hope they help a bit.

Best wishes,

Mark

 Signature 

Full List Of Plugins Here!! (16)
 
Retrieve Statuses
Maximum Posts Reached
Neat Link
Redirect
Fetch URI

Profile
 
 
Posted: 07 May 2008 08:03 PM   [ Ignore ]   [ # 3 ]  
Lab Assistant
RankRank
Total Posts:  141
Joined  03-05-2008

I’ve been experimenting with the Playa extension and Selected Items module for this very purpose.

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: 65087 Total Logged-in Users: 38
Total Topics: 82226 Total Anonymous Users: 22
Total Replies: 441924 Total Guests: 214
Total Posts: 524150    
Members ( View Memberlist )