Closed (fixed)
Project:
Adjusti-Search
Version:
6.x-1.4
Component:
User interface
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
11 Mar 2010 at 16:54 UTC
Updated:
23 Apr 2010 at 02:53 UTC
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
Comment #1
ConnorK commentedI'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.
Comment #2
gmclelland commentedThanks, looking forward to it.
Comment #3
ConnorK commentedAs 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_formfunction 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.Comment #4
gmclelland commentedThank 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
Comment #5
ConnorK commentedUsing 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.
Comment #6
gmclelland commentedNot 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