[development] [Fwd: Re: Error defining parameters in hook_theme]

Steve Edwards killshot91 at comcast.net
Tue Dec 8 18:09:01 UTC 2009

OK, got this taken care of, and in quite a painless way.  The reason I 
was trying to use a theme function was because I (mistakenly) thought 
that getting rid of the divs put around the added form element was 
causing the problem.  Actually, the display problems are caused by the 
margin and padding settings for the tabledrag handle, which cause the 
fields to combine together.  Since the handle is simply added to the 
first column on the page, I just added an empty column at the beginning 
of the table in my override of theme_nodequeue_arrange_subqueue_form.  
Thus, the tabledrag handle gets put in the empty column by itself, and 
everything lines up nice and neat.


-------- Original Message --------
Subject: 	Re: [development] Error defining parameters in hook_theme
Date: 	Mon, 07 Dec 2009 13:47:09 -0800
From: 	Steve Edwards <killshot91 at comcast.net>
To: 	development at drupal.org
References: 	<4B1D6E4C.906 at comcast.net> 
<ccbb750f0912071335g121b1f86r58368119dd70c0b6 at mail.gmail.com>

Actually, I have everything working as I need it for my required 
functionality, except for the display of the title as an editable text 
field.  I can save the data in my table and reorder the items using the 
default nodequeue functionality just fine; it's just the display of the 
field as a textfield which is causing the problem (see 
http://drupal.org/node/653574 for details).  My reason for trying to use 
a #theme function for this field was that it appears that the div that 
is put around the form item in theme_form_item (being called through 
hook_form_alter) was what was causing the display problem, so I was 
going to remove it by overriding theme_form_item for that field.  I 
don't think overriding  theme_nodequeue_arrange_subqueue_form would 
work, since the div that is causing the problem is introduced in 
hook_form_alter.  Unless I change the field type in there....  Hmmm...

All I need is to get the display of the field working properly; 
everything else is working as I need it.  I'm so close I can taste it...



Ezra B. Gildesgame wrote:
> It seems like you're touching on a relatively common feature for
> Nodequeue: Displaying fields from the nodes while changing the
> subqueue order.
> 3rd from the top of the Nodequeue issue queue is
> http://drupal.org/node/299111, which has an example from one developer
> that might be helpful if it's applicable to Nodequeue 6.x. It's
> probably easier easier to just theme the whole
> nodequeue_arrange_subqueue_form (we have
> theme_nodequeue_arrange_subqueue_form) and tweak the presentation of
> this field there, since much of the node object is available as part
> of the form.
> Ultimately though I think the best and most re-usable solution for
> your apparent end goal is what's proposed at
> http://drupal.org/node/568100 -- Implementing the Nodequeue ordering
> interface as a Views style plugin. Then we could display any field
> with Views support and non-developers could customize the interface
> for their use case (photo gallery, album mp3 track listing, etc).
> For the question about how #theme works, it might be helpful to
> checkout drupal_render(), which checks for $element['theme'], print
> out the lone argument passed to your custom theme function, and/or see
> http://api.drupal.org/api/drupal/developer--topics--forms_api_reference.html/6#theme.
> Cheers,
> Ezra
> On Mon, Dec 7, 2009 at 4:06 PM, Steve Edwards <killshot91 at comcast.net> wrote:
>> I need to replace the title with a text field and use a custom theme
>> function
> Ezra Barnett Gildesgame | http://growingventuresolutions.com | http://ezra-g.com

More information about the development mailing list