Brown Eyed Girl (browneyedgirl65) wrote in component_help,
Brown Eyed Girl
browneyedgirl65
component_help

okay, $e.new_day

I don't think $e.new_day is *quite* what I want....
Hmph. It is indeed. Thanks, all.

On a given journal page, several days worth of entries might be listed, depending on how many entries I've been making and how many I have showing on the page. I did try to call the print_entry_header function only when $e.new_day was true, but got no functional change.

Either: this variable has some other values than true/false :D
or: it doesn't have the info I want.

Basically, I need to track the "day" of the last printed entry; when it changes, I know I've reached the day previous to the one I've been printing out, so I then print the header, and then go back to printing no more headers for the rest of then entries for that day, and so on. So say for today, the first (most recent) entry would have

THURSDAY
entry1
entry2
entry3
WEDNESDAY
entry1
entry2
TUESDAY
entry1
MONDAY
entry1
entry2
entry3

and so on. So if I track "last day printed" basially, and compare that to the day of the current entry I'm printing out, I'll know when it changes, and therefore to print it out.

But I can't do this in the print_entry function itself, since that just prints one entry, without the context of knowing what the day of the last printed entry was. To do that I think I need to redo the print_my_entries function...then I can save the last printed day and compare it with the current one being printed in the loop.

--BEG
Subscribe
  • Post a new comment

    Error

    Anonymous comments are disabled in this journal

    default userpic

    Your reply will be screened

  • 5 comments