Hi to all.
I am new in Drupal and i have to modify an existing theme. I have to create a custom page with a specific layout, different from other pages ones.
I tryed to use the node--slug.tpl.php method, but it doesn't work.
Looking for a solution on the web, i understand that i must edit the template.php file in y theme and add some line of code to the %themename%_preprocess_node() or %themename%_preprocess_page() function.
I tried to add these lines to the %themename%_preprocess_node() function:
$vars['theme_hook_suggestions'][] = 'node__' . $field;
$vars['theme_hook_suggestions'][] = 'node__' . $node->type;
$vars['theme_hook_suggestions'][] = 'node__' . $field . '__' . $node->type;
But it doesn't work, so i tried to add these to the %themename%_preprocess_page() function:
$vars['theme_hook_suggestions'][] = 'node__page__' . $field;
$vars['theme_hook_suggestions'][] = 'node__page__' . $node->type;
$vars['theme_hook_suggestions'][] = 'node__page__' . $field . '__' . $node->type;
But it doesn't work either.
I created a page from the backend "Test page" with "www.mysite.com/test-page/" url. Then added a file to my theme directory and tried to rename it with the following names, without any success:
node--580.tpl.php
page--node--580.tpl.php
node--test-page.tpl.php