By pixi on
Hi there !
It's me again n again :p
Got a hook_theme():
function idea_theme($existing, $type, $theme, $path) {
$items['page_accueil'] = array(
'render element' => 'form',
'template' => 'page-accueil-form',
'path' => drupal_get_path('theme', 'idea') . '/templates',
);
return $items;
}So when I call http://localhost/idea_site/page_accueil
I can see my form named 'page-accueil-form'!
But how to get it on the front page please?
I mean I want to display my form in this url: http://localhost/idea_site
Comments
Got a problem with my theming
Got a problem with my theming form...
hook_theme():
/templates/page-accueil-form.tpl.php:
What's wrong with this plz?
up?
up?
What's wrong with this plz?
How are we supposed to know? You didn't tell us.
Contact me to contract me for D7 -> D10/11 migrations.
hook_theme():
hook_theme():
/templates/page-accueil-form.tpl.php:
and in page_accueil.form.inc:
I tried with this hook_theme(
I tried with this hook_theme() too:
Ok.
Ok.
I'm guessing that you are expecting something to happen, and it isn't happening.
How are we supposed to know what that is?
Contact me to contract me for D7 -> D10/11 migrations.
OK sorry Jaypan...
OK sorry Jaypan...
I'm trying to theme my form.
I don't understand why I can't see my template "page-accueil-form" ^^
What are you seeing?
What are you seeing?
Contact me to contract me for D7 -> D10/11 migrations.
It's ok now.
It's ok now.
I added:
$form['#theme'] = 'page_accueil_form';in /templates/page-accueil-form.tpl.php
and a hook_menu():
in my page_accueil.module :)
This tutorial helped me : http://harshal-techapps.blogspot.fr/2011/03/drupal-7-hooktheme-template-...
Thank You too, Jaypan ;)