[development] Error defining parameters in hook_theme

Steve Edwards killshot91 at comcast.net
Mon Dec 7 21:47:09 UTC 2009


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...

Thanks.

Steve



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