Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
By aflatoon on
can anyone tell me the difference between template and theme
Comments
Theme vs template
Theme refers to a set of files which control the HTML generation/presentation. For each request the drupal and modules create the data as a data structure (associative array or object). The theme layer takes this data and creates HTML. It also has css files to control styling.
Template in the context of a theme are files with the html code, with placeholders for actual data. in the case of php templates the placeholders are php variables. Template files contain the html generated for a particular piece of content like node, block etc.
Difference between template and theme
can you explain that in more simple words.
thanks
...
Theme = lots of files in a folder - for example; page.tpl.php, node.tpl.php, block.tpl.php, style.css, template.php
Template = one file, for example; page.tpl.php
A theme is therefore many files that work together and a template is just one of the files (there can be many templates in a theme).
Pimp your Drupal 8 Toolbar - make it badass.
Adaptivetheme - theming system for people who don't code.
difference between theme and template
thanks :)
theme_image_multifield_multitype() is not getting called
@Jeff burnz sir I have some doubts in themes. I created a form to add images to cloudinary using **theme_image_multifield_multitype()**. But this is not getting called. In the error report it is showing "Theme hook image_multifield_multitype not found". why this is not getting called?
=-=
your question has nothing to do with the opening post. Your question deserves its own thread.
okay.
okay.
So... which is better?
Hi everyone. Just getting familiar with Drupal and loving it so far. In my research of Drupal themes I came across this post and it has me wondering (and please excuse me if this is noob but) which is better to use, Template or Theme? TIA
...
Drupal uses themes, a template is just one file in the whole theme package. At minimum a Drupal 6 theme consists of an info file and a CSS stylesheet (Drupal has default templates it falls back on if none are included in the theme).
I've run into the occasional issue of a theme not being recognised by Drupal if a page.tpl.php file is omitted, so I tend to always use one - in any case this is the grand-daddy template file and the one that often gets the most customisation.
So, to answer your question - both.
Need help with IE?
Learn basic XHTML and CSS first.
Get smart with web specs.
Pimp your Drupal 8 Toolbar - make it badass.
Adaptivetheme - theming system for people who don't code.
Many thx
I had a feeling you were going to reply that way. Thank you.
I'm having Joomla theme envy!
While searching for some cool website ideas to add to my church's website that I'm developing I found this link: http://www.mygenerationschurch.com/. My pastor and I fell in love with this site theme. I did some checking (looked at the source code) and realized it's a Joomla theme. Since we think this theme is perfect for our church I'm wondering what can be done to get this theme into Drupal? Any constructive ideas and suggestions are greatly appreciated. TIA
No, but...
No, because the theme is not GPL, but rather a commercial design by the website developer.
Of course the design can be achieved in Drupal, that is no problem at all.
Pimp your Drupal 8 Toolbar - make it badass.
Adaptivetheme - theming system for people who don't code.
...Can be achieved?
Ok, i'm feeling better about the under-taking of creating a "similar" theme but how easy is easy? Since I am a Drupal newbie I'm not that good with theme creation. Any recommendations on how and where to start?
For the record, the template main content area is where I'd like to have big pictures in a table-light linking to other pages within the site module and a calendar, very similar to the church website I mentioned before. TIA
=-=
start with the theme developers guide in the documentation area.
use the firefox browser with the firebug addon to begin familiarizing yourself with what themes are doing and how it all comes together. Then feel free to start tweaking or building your own from scratch.
certainly...
I will do that... ThANK YOU
...
For building your own highly customised theme you might want to start with a base or "starter" theme, http://drupal.org/node/323993 is a round up.
Pimp your Drupal 8 Toolbar - make it badass.
Adaptivetheme - theming system for people who don't code.
difference between theme and template
Theme is collection of temples.
templets are like page.tpl.php,node.tpl.php,comment.tpl.php etc...
This question is over 7 years
This question is over 7 years old, I think it's safe to say we're done here...
Pimp your Drupal 8 Toolbar - make it badass.
Adaptivetheme - theming system for people who don't code.
All templates are categorized
All templates are categorized under a theme. The theme is where the HTML/CSS code for a template is located. Just like WordPress themes and WordPress templates. For many people, the use of the word Theme and Template mean the same thing
NOT DONE - in the Drupal 8 sense.
Please correct me - because I certainly need the guidance / help.
I've been reading LOTS of D8 documentation and reviewing API code and naming convention. I'm remembering seeing some functions (which I assume can be overridden) prefixed with template_ and some functions (which I also assume can be overridden) prefixed with theme_.
I'd love to know the difference if you can tell me.. 'cause I been trying for days. coming up blank.