User login

Drupal

Views Sorting Gotchas: If using group by, also sort; and in all sorts make sure the field exists!

Interesting... you need to sort by the same field you group by, or on a paged view the grouping is done per page!

And in a different view, a different, dumber problem...

drupal views datestamp sort
drupal convert datestamp to date

Datestamp wasn't the problem. Trying to sort on a field that didn't exist for that node type was! It appears to react to nonsense by sorting randomly, which I guess is fair...

Maintaining a module on Drupal.org with CVS: committing changes

This is for a module where the current version's code is in HEAD and we aren't going to do any branching.

(agc is an agaric-specific helper script.)

agc entreztest NEW
cd drupal/
cd sites/all/modules/
mkdir entrez
export CVSROOT=:pserver:agaric@cvs.drupal.org:/cvs/drupal-contrib
cvs login
cvs co -d entrez contributions/modules/entrez
cd entrez/

How to add a node id to a page's CSS classes

If your page.tpl.php already prints $body_classes (or equivalent) in the <body> tag, then you likely need only to add a single line to have the nid included with a class such as "node-1".

drupal add node id to theme template
drupal add node id to page template

http://drupal.org/node/360484

Remove page headline for a given content type

To remove the page title (the one that prints in the page itself, not in the browser bar) for a specific node type, use this simple code in your template_preprocess_page() function.

Make sure you wrap the code that outputs the header in page.tpl.php in a conditional if statement, so that if there is no title it does not output the <h1></h1> tags.

This code goes in template.php of a theme named "example":

Agaric wants to automatically repeat top-level primary links as the first child of itself

drupal repeat top menu item in dropdown
repeat top menu items drupal
repeat Primary Links dropdown drupal
drupal duplicate main menu items

Request: "The titles can also be clicked and should be included in the dropdown menu." Understood now: Each top-level primary link will be repeated in the drop-down menu. This gets around the fact that many people will not realize they can click on the menu item itself as well as the dropdowns.

WYSIWYG module gotcha: after upgrading or changing editors, delete profiles to resume

If you change wysiwyg editors, you have to delete the profiles and start anew.

wysiwyg drupal cannot select editor

Editor selectbox disabled
http://drupal.org/node/487848

Syndicate content