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 :)

No related posts.

Related posts brought to you by Yet Another Related Posts Plugin.

3 Responses to "daily graphics"

1 | 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…

2 | Tam

June 24th, 2002 at 10:16 pm

Avatar

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

3 | Tam

June 24th, 2002 at 10:15 pm

Avatar

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

Featured Sponsors


  • Curt: If anyone comes across this with similar issues I was able to sort out the pagination issues painlessly with easyCommentsPaginate from http://www.mush
  • Christopher: Yeah, it is indeed hard to do. And something remains elusive about why the pagination never worked. I tried everything I could find. Regardless, I
  • Jennifer: Hi Christopher, always hard to bug test stuff like that remotely. Sorry those didn't help. Glad you found a solution though :)

About


Advertisements