scriptygoddess

24 Jun, 2002

daily graphics

Posted by: kristine In: How to's

Would you like to add a different graphic title for each day? Here's a great way to do this with Movable Type and Greymatter.

Make graphics for 12 months (January-December), 31 days (01-31), and/or 7 weekdays (Sunday-Saturday) and/or several years (2002). Be careful to pay attention to the case of the filename (name the file Sunday.gif rather than sunday.gif)

Then set up your date header to show images based on the date:
in Movable Type – put inside the MTEntries container in your Main Index template or anywhere on your Individual Archive template:

<MTDateHeader>
<img src="daygraphics/<$MTEntryDate format="%A"$><img src="daygraphics/<$MTEntryDate format="%B"$>.gif"><img src="daygraphics/<$MTEntryDate format="%d"$>.gif"><img src="daygraphics/<$MTEntryDate format="%y"$>.gif">
</MTDateHeader>

(for a list of all of the date tags available, visit the MT Manual's Date Tag Formats)

in Greymatter – inside the Date Grouping Template:

<img src="daygraphics/{{weekday}}.gif"><img src="daygraphics/{{monthword}}.gif"><img src="daygraphics/{{dayday}}.gif"><img src="daygraphics/{{yearyear}}.gif">

(for a list of all of the template variables, visit the Greymatter Manual)

I have had several requests on the MT boards for this lately, and thought I'd put it together with the GM stuff here for everyone to use :)

3 Responses to "daily graphics"

1 | Tam

June 24th, 2002 at 10:15 pm

Avatar

Thank you! I've been looking for the way to do this!

2 | Tam

June 24th, 2002 at 10:16 pm

Avatar

Thank you! I've been looking for the way to do this!

3 | erin

March 27th, 2004 at 9:39 am

Avatar

any idea how to have different dateheader images – but – here's the sticky wicket, i am trying to skin my site and i have a couple of different dateheader images… i cannot for the life of me get both to work in their respective templates…

Featured Sponsors

Genesis Framework for WordPress

Advertise Here


  • Scott: Just moved changed the site URL as WP's installed in a subfolder. Cookie clearance worked for me. Thanks!
  • Stephen Lareau: Hi great blog thanks. Just thought I would add that it helps to put target = like this:1-800-555-1212 and
  • Cord Blomquist: Jennifer, you may want to check out tp2wp.com, a new service my company just launched that converts TypePad and Movable Type export files into WordPre

About


Advertisements