In the last two weeks I’ve fallen in love with Tumblr. Mostly because it’s SO darn easy to post a photo, link or quote with the bookmarklet. If you look over in the left sidebar of LittleBirdLLC.com/blog there is a stream being pulled in from our Little Bird tumblr. The web is full of amazing things that we see everyday – this is an easy way to collect them as a resource and share them with you.
First, paste the following into a text widget or your sidebar.php file. Replace ‘yourname’ with your tumblr account name.
The /js$num=5 is limiting the amount of posts to 5, this can be whatever number you want.
If you look at it now it’s probably a mess. Every element has tumblr css classes wrapped around it so next you’ll want to style it. At the very least you’ll need to change the width so it fits. I recommend using Firebug, the Mozilla Firefox extension, for finding and styling your posts.
How could I not spend all night testing out the new Google font directory!? As always this site’s a work in progress but I did give the homepage a facelift and added the font IM Fell DW Pica. Too cool!
I’ve been working on littlebirdllc.com since last fall. Designed 10 different versions, coded about 6, started in Drupal and ended with WordPress. Do all designers have such a hard time designing their own business sites? It’s just never right, never cool enough, never finished. I decided on Saturday that this had gone on TOO long. Imagine my surprise when I actually came up with a design I liked right after deciding I just wanted to get something up? Design is funny like that. It’s still a work in progress, but it’s something. Thanks for reading!
As the interface for your website, the menu gets plenty of action. You might want to tune it up a bit, adding something to make it special. Drupal has an extensive API for interacting with the menu items you create.
On our website, we wanted subtext for each primary menu item – as you see above. Drupal usually displays the link titles only. There is a description field for each menu item, and we thought that would be a great place to enter the subtext we enter. I set out to generate my own menu and place it in a block on my page. menu_navigation_links() looked like a promising function from the menu API.
I enabled the devel module and put the execute PHP block at the top of the page. I got to work creating the PHP that would do the trick. Dealing with arrays can be tricky if you don’t do it often. Using the PHP function print_r() , you can view the contents of your menu array. Like so:
Once you have the PHP worked out, make sure the PHP filter module is enabled for the site under admin/build/modules. Create a block at admin/build/block. Insert PHP code and change the input type to PHP.
//Get the menu structure and place in a variable. An array is returned.
$menuitems = menu_navigation_links('primary-links', $level = 0);
//Loop through the menu items, setting two classes for the design and outputting what we want
foreach ($menuitems as $key=>$value)
More information on the Drupal menu API for all versions: