How would I add some css classes to this block's output? I don't see any theme function or tpl.php file to override the output.

Thanks for your help

Comments

ConnorK’s picture

Status: Active » Needs work

I've been slowly working towards adding template support into the module but have not had time to complete it. I should hopefully have it done in the next week or so time permitting.

gmclelland’s picture

Thanks, looking forward to it.

ConnorK’s picture

Status: Needs work » Fixed

As of versions 6.x-1.5 and 5.x-1.5, I've added theming support. It's rather simplistic as this was my first time working with these functions, however it does at least work. You can now make changes to the appearance of the module output for the block by using the included template file.

Unfortunately, I couldn't render the form separately from the drupal_get_form function as it caused errors with functionality, so it's just a single variable in the template. If anyone happens to know how I could render the elements separately for inclusion in the template to give more fine-tuned control over the output, please don't hesitate to give me some direction and I will create that as a patch until the next release.

gmclelland’s picture

Thank you for adding this. This will make it alot easier to add additional markup to the adjustisearch block. I mainly was hoping to change the form submit button into an image submit button, but I guess I will have to do this using the FAPI?

Thanks for your help

ConnorK’s picture

Using the FAPI and hook_form_alter or altering the actual form itself would be your best bet at this point unless I can find some way to render the form elements individually and be able to retain the functionality of the module.

gmclelland’s picture

Not sure if this helps, but I just read this article http://www.trellon.com/content/blog/forms-api where it talks about theming with a theme function.

In that function they have
$output .= drupal_render($element['mytext']);
$output .= drupal_render($element['submit']);

Maybe, you could do something like that in tpl.php to render each form element? I'm still learning, so pardon me if this is complete nonsense.

Hope that helps

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.