[development] view + cck or views + form_alter
John Barreiros
johnbarreiros2 at gmail.com
Fri Oct 5 02:49:03 UTC 2007
Thanks for the response Larry. I'm trying to wrap my head around your
solution, which for the most part makes sense. My only question is, does it
work if you're viewing a "view" page? For example, I navigate to the "news"
page which is just a view displaying the last 10 news nodes. Will the
sidebar block display an image?
thanks again.
On 10/4/07, Larry Garfield <larry at garfieldtech.com> wrote:
>
> Funny you should mention it. I just got around to documenting the way we
> tackle this issue at Palantir today:
>
> http://drupal.org/node/180852
>
> As for the Views, create a node type that has nothing but a title and
> Viewfield CCK type. Create a node of that type and specify the View to
> use.
> Tada, you have a node. Note: Doesn't work with dynamic arguments, sadly.
> :-(
>
> Cheers.
>
> On Thursday 04 October 2007, John Barreiros wrote:
> > Hi All.
> >
> > This particular site I'm building features a layout with a photo in the
> > upper right corner. The client wants to have the ability to specify the
> > image on every single page. I know I know, kind of whacked, but it's
> what
> > they want.
> >
> > So, first step was to use cck to add a new field to the "page" type. I
> > tried imagefield but didn't like how you couldn't select an existing
> image.
> > I managed to whip together a new cck field which uses IMCE to select the
> > image (I'll up it to cvs after some more testing and some coworkers give
> me
> > the thumbs up on its quality).
> >
> > Okay, so that takes care of any pages displaying a single node.
> >
> > How do I handle views? There are a few views and they obviously need to
> > have the image customizable. It'd be nice if when creating a "view" to
> > provide a page, it inherited the cck fields from the "page" type.
> >
> > Could I use form_alter to add the cck field to the views form?
> >
> > Or is there some way when the "view" is being built I can extract the
> image
> > from the first node and pass it to page.tpl.php?
> >
> > Any help would be appreciated. Thanks in advance.
> > -john
>
>
> --
> 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
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.drupal.org/pipermail/development/attachments/20071004/f5b2b4f1/attachment.htm
More information about the development
mailing list