Archive for the ‘theming’ Category
Customizing the Front Page in Drupal
Most of the default Drupal Themes display a simple list of the last 10 entries with pagination if needed.
Some of my first custom front pages involved writing sql and laying out the results within the page-front.tpl. While this worked great and made it easy to control exactly what and where things appear.
But later on when the owner wanted mild changes it required digging back into a complex template file instead of just making alterations from within the Drupal Admin area.
Adding Meta Descriptions to Taxonomy Pages
In the previous meta description entries I created a meta description field for my content type, altered my page.tpl to show the meta description if it was available and used the site $mission field to use as the front page meta description.
Now I need to alter it again to use a taxonomies term description as the meta description for those pages. I also added a title alteration for paginated pages.
Using Google CSE on Drupal
The goal was to use Google CSE on drupal, and while I got it working it was not near as easy as I would have liked.
At first it seemed simple, google provides two pieces of code; One to build the search form, and one to display the results within your own page.
I added a block for the Google search form which was quite simple. After creating the block I removed Drupals search block and added the new Google search block. (On creating the search engine I gave it the url of http://cross-tags.com/search-result for the results to appear).
Adding a sticky note style box to content
Now I want to be able to add a floating block similar to the related content block I added earlier. But I also want to be able to add as blocks as I want and control where at in the entry it appears.
So instead I used css and some images to create one the author could create when and where needed. (The author must be able to use the full html input format or the code will not come through)
Adding a See Also to a content type
While taxonomy and views can be used prived a list of related entries, it lacks the ability for the author to select individual related entries. Such as writing a short series over time and wanting each in the series to display links to the others.
For this purpose I added a new field Node reference to allow the author to add as many references to existing nodes as needed.