Closed (fixed)
Project:
Documentation
Component:
New documentation
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
25 Sep 2008 at 19:59 UTC
Updated:
2 Jan 2014 at 23:45 UTC
Jump to comment: Most recent
Hey Docs team :)
I wrote up a new "ultra simple" guide to basic theming in Drupal:
http://drupal.org/node/313510
I'd appreciate any reviews, corrections, or feedback.
Thanks!
Comments
Comment #1
Jeff Burnz commentedWell great effort, a few bits of feedback.
In the section "The main "dynamic" content of the page", the if statement wrapping the main group of variables is redundant, you'd only do that if the variables were themselves wrapped in HTML etc.
I think the $tabs should be wrapped in an if.
Personally I also think the default page.tpl.php is a good reference for any newbie themer. Its worth pointing out where to find the default files so they can find them (I mean, who would think to look in the systems module?).
The default tpls make heavy use of !empty on almost all variables, I make the assumption this is because of php warnings (expained here), I tend to think its worth instilling this coding standard early in a themers learning curve.
I can see a few places where the grammar and or sentence structure could be marginally improved, would it be ok if I made some slight adjustments?
Comment #2
dnewkerk commentedHi Jeff -
Certainly... please feel free to make any adjustments or changes you'd like - the help is greatly appreciated :)
The code bits I extracted directly from a few common themes such as Garland and Zen (which doesn't necessarily mean they're correct though of course)... if I recall, I "picked and chose" based on the ones that seemed more simple. If you could improve them, that would be awesome :)
Thanks my friend.
- David
Comment #3
Jeff Burnz commentedYea, I can see that some it came from Zen (not so many other themes use Logical OR, except for mine...) but in the original the breadcrumb, title, tabs etc are wrapped in a DIV and the tabs are wrapped in an IF - I'll take a look later to day and think about ways to make it more clear and easy to noobs.
Comment #4
dnewkerk commentedHm good point... not sure what I did haha (was a few months ago when I originally did that I believe). I probably got a bit "too" into simplifying to the point of messing it up :P Please do feel free though to replace the code with a better snippet, as well as make any other changes you recommend.
Comment #5
dnewkerk commentedMade some changes per your recommendations (see the revision notes)... if you have time, please feel free to add more changes, and adjust the wording that you noticed could be better-stated. I didn't use !empty, but I'll read up on the link you gave.
Thanks :)
Comment #6
johnnocNice!
Some feedbacks, though.
<html xmlns="http://www.w3.org/1999/xhtml" lang="<?php print $language->language ?>" xml:lang="<?php print $language->language ?>" dir="<?php print $language->dir ?>">is important.regions[footer] = Footeron the .info file but<?php print $footer; ?>is not on page.tpl.php<?php print $breadcrumb; ?>encloses the breadcrumb in a div already so an extra div on the line:<?php if ($breadcrumb): ?><div id="breadcrumb"><?php print $breadcrumb; ?></div><?php endif; ?>may not be needed. That is also why
<?php if ($messages): print $messages; endif; ?>and<?php if ($help): print $help; endif; ?>are not enclosed in divs.This page is really helpful to a lot of people! Good work!
John
----------------------
Drupal Norge
hvor oversettere, brukere, utviklere og leverandører av Drupal i Norge samles
Comment #7
jhodgdonIt looks like part of the above comment has been addressed (footer and footer message), but not all. So I am giving this a "needs work" status; hopefully the original author is still available and will make the (minor) changes, then marked this issue as "fixed". Or maybe the person who did the feedback will make the changes and mark it fixed. Thanks!
Comment #8
jerdavisI've updated the page with the rest of the changes recommended in #6.
Comment #9
jhodgdonLooks good to me. Thanks!