[support] views question

Larry Garfield larry at garfieldtech.com
Wed Apr 2 05:45:59 UTC 2008


Hm, somehow I invented the word "random" in there.  Not sure how. :-)

I'm not sure, though, how you'd want it controlled.  The admin workflow will 
inform how you build it.  You could just as easily have the view throw out 
all but the first image, for instance, if you wanted to only use the first 
image in the view.  If you want it to be admin-selected, you could give them 
a separate CCK numeric field where they enter the offset (0-based, of course) 
of the image to use, but the usability of that option leaves something to be 
desired.  At that point, I'd suggest that a multi-value CCK field is the 
wrong way to store the images in the first place.

On Tuesday 01 April 2008, sander-martijn wrote:
> Thank you larry, I was beginning to think I wouldn't get a response.
> The option of random probably won't please the client, but at least it's
> a start.  And if they're not happy with that and want to select an
> image, at least I know where to start - I would imagine adding a cck
> field for selecting the image and then using a theme function for the
> view would be a combination that could work.
>
> .s
>
> Larry Garfield wrote:
> > You would need to edit the theme function for the view (the one generated
> > by the theme wizard) to take the list of fields in a given row and
> > randomize it, using array_rand() or similar.
> >
> > On Tuesday 01 April 2008, sander-martijn wrote:
> >> any thoughts on this?
> >>
> >> sander-martijn wrote:
> >>> hi,
> >>>
> >>> when using views with "group multiple values", a thumbnail and
> >>> arguments, is there any way to control which image is used for the main
> >>> thumbnail?
> >>>
> >>> thanks
> >>> sander


-- 
Larry Garfield			AIM: LOLG42
larry at garfieldtech.com		ICQ: 6817012

"If nature has made any one thing less susceptible than all others of 
exclusive property, it is the action of the thinking power called an idea, 
which an individual may exclusively possess as long as he keeps it to 
himself; but the moment it is divulged, it forces itself into the possession 
of every one, and the receiver cannot dispossess himself of it."  -- Thomas 
Jefferson


More information about the support mailing list