Home > Code Snippet

After upgrading to Drupal 6 I opted for a quick and dirty XML sitemap approach. Before I was using the XML Sitemap module which is currently available for Drupal 6 as a development snapshot or directly from CVS. The module offers settings for priority and change frequency. Moreover the module allows for adding taxonomy term and user URLs to the sitemap.

I only wanted nodes and the front page to appear in the sitemap's XML output without priority or change frequency information. Having the path and pathauto modules enabled, which ensure that every node gets a meaningful and search engine friendly URL, a simple database query joining two tables is enough to get the necessary data for all published nodes.

Are you sick of annoying ads that take up large parts of the screen, pop up, under or anywhere else, move around, blink and flash? You want to learn how to create ads that rock with a few lines of simple JavaScript and PHP code? Then let me show you how.

In this article I describe how you can parse and display Yahoo Pipes data returned as a JSON feed. Yahoo Pipes can be used as a data aggregator that lets you mashup online data sources, such as RSS feeds. To learn more about Yahoo Pipes and how to create them you can watch this video on how Yahoo Pipes work.

When using Drupal's menu system for linking pages on your site the corresponding menu link gets the CSS class active when the referred page is being displayed. To make use of this to improve a site's usability you can highlight this link by assigning a different color, background color, etc. Drupal's l() function also takes care to add the active class to currently displayed links.

On this site I have to blocks in the sidebar (Recommended Articles, Drupal Modules) with hard-coded links to internal pages using plain HTML. My main reason not to use menu items is because I am too lazy and I don't use the l() function to not increase the number of database queries more than necessary.

According to 37 organic search engine optimization experts the Keyword Use in Title Tag is the number one of the positive factors that influence the search engine ranking of a page.

When I search for something and see the result page the first thing I do is take a look at the titles of the linked pages, than I look at the URLs before I actually click on one of the links. Titles and URLs often reveal more than just whether the result may be good or not.

Syndicate content