[support] HTML helper function in Drupal
Bojan Mihelac
bmihelac at gmail.com
Wed Feb 20 18:28:13 UTC 2008
On 20.2.2008, at 18:26, Earnie Boyd wrote:
> Quoting Bojan Mihelac <bmihelac at gmail.com>:
>
>> Hi all,
>> does Drupal have some helper function for creating HTML tags, like it
>> exists in Rails (and I think cakePHP)?
>>
>> somethin that could be called like this:
>>
>> $output = tag("h1", $node->title, array('class' => ''title));
>>
>
> You mean something like http://api.drupal.org/api/function/theme
Earnie, thanks for your answer.
Well, I was looking for some easy way to create HTML code from custom
module.
I would like to be able to call template file and send some variables
to it for styling. Something like: $output =
template("my_template_name", $vars_to_pass). Is there function for
this?
To create HTML directly from module, without calling template is also
option and I am aware about helper functions for creating links,
lists, tables but I didn't found helpers to avoid inserting HTML in
PHP code.
Bojan
>
>
>
> Earnie -- http://for-my-kids.com/
> -- http://give-me-an-offer.com/
>
> --
> [ Drupal support list | http://lists.drupal.org/ ]
More information about the support
mailing list