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

Jeff Burnz’s picture

Well 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?

dnewkerk’s picture

Hi 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

Jeff Burnz’s picture

Yea, 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.

dnewkerk’s picture

Hm 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.

dnewkerk’s picture

Made 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 :)

johnnoc’s picture

Nice!

Some feedbacks, though.

  • I think adding <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.
  • You have regions[footer] = Footer on the .info file but <?php print $footer; ?> is not on page.tpl.php
  • What about $footer_message? To print the footer message as defined in the admin settings.
  • <?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

jhodgdon’s picture

Status: Active » Needs work

It 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!

jerdavis’s picture

Status: Needs work » Needs review
Issue tags: +tcdocsprint09

I've updated the page with the rest of the changes recommended in #6.

jhodgdon’s picture

Status: Needs review » Fixed

Looks good to me. Thanks!

Status: Fixed » Closed (fixed)
Issue tags: -tcdocsprint09

Automatically closed -- issue fixed for 2 weeks with no activity.