I have a content type called 'test', I need to disable Header, sidebars and fotter for this content type.
I just need content to be in this content type.
You should create a separate template file with in your theme for that specific content type and remove the regions in that file that you do not want to show. For example if your content type is "test", then the new template file will be called "page-test.tpl.php"
Now you will need to write this code in your template.php (create a file with this name if it does not exists) file:
Yes it always works for me, I have used it so many times. Can you tell me the steps that you exactly followed. Also can you send here the function code that you have written in template.php file.
Comments
I have a content type called
I have a content type called 'test', I need to disable Header, sidebars and fotter for this content type.
I just need content to be in this content type.
Any Idea to do this?
You should create a separate
You should create a separate template file with in your theme for that specific content type and remove the regions in that file that you do not want to show. For example if your content type is "test", then the new template file will be called "page-test.tpl.php"
Now you will need to write this code in your template.php (create a file with this name if it does not exists) file:
Note that this solution is for Drupal 6 and you will need to clear drupal's cache after following these steps.
I did it but it's not
I did it but it's not working!
After doing this now i can see header and footer inside the content part. but the main header, sidebars and footer is still visible.
I just need to disable header, sidebars and footer from the 'test' content type.
Did you remove header,
Did you remove header, sidebars and footer from new template file?
Yes did
Yes did
Did you got it working
Did you got it working anytime?
Why it's not working for me?
Any idea?
Yes it always works for me, I
Yes it always works for me, I have used it so many times. Can you tell me the steps that you exactly followed. Also can you send here the function code that you have written in template.php file.
I have a file called
I have a file called
page-test.tpl.phpfor this page i have copied code from page.tpl.phpand then i have removed the areas which i don't need it to visible (like: header, sidebars).
This code is pested in
template.phpfileis this right?
Ummm... the work you have
Ummm... the work you have done seems fine. Did you clear drupal cache?
Yup!
Yup!
did you end up getting this
did you end up getting this to work ?
also where were these files contained because i can find more than one template.php file........
one in the current theme directrory, and another in the sites/all/themes directory.
also i have cleared my cache and im still stuck with the header in one page i dont want it to appear on. http://www.beta.entropiamedics.com/im
go figure... :)
I got it working with this code
it needed to be in the page preprocess function to apply the custom tpl to the page instead of the node
pagenosb is my custom content type, stands for page no sidebars
i then needed to remove zen body classes that were still applying sidebar theming even though sidebars were not printed
i don't know much php but this seemed to have worked