I have a blog whose main index is entries from two blogs included through Multiblog. I have the posts from each blog grouped by date using the following code:
<mt:MultiBlog> <mt:Entries lastn="20" include_blogs="x,y" sort_order="descend"> <MTDateHeader> <h2><$mt:EntryDate format="%A, %d %B %Y at %I:%M %p"$></h2></MTDateHeader> <mt:SetVarBlock name="BlogID"><mt:BlogID></mt:SetVarBlock> <mt:If name="BlogID" eq="x"><div class="x">ENTRY CONTENT</div></mt:if> <mt:If name="BlogID" eq="y"><div class="y">ENTRY CONTENT</div></mt:if> </mt:Entries> </mt:MultiBlog>
I'd like to wrap each group of entries for blog "y" that occur on the same date within a div, sort of like how <MTDateHeader> will print once only for each block of dates. I would use MTDateHeader but that omits subsequent entries on the same date.
Basically, I'm trying to get final code that schematically looks like this
Some Date <div class="x"> blog x entry 3 blog x entry 2 blog x entry 1 </div>Another Date, not necessarily different
<div class="y">
blog y entry 3
blog y entry 2
blog y entry 1
</div>
The important part is that I wrap all the blog entries in the appropriate div class structure.
Thank you, in advance, for any pointers you can provide.
Unfortunately, MTDateHeader will not span the
Reported on Movable Type 4.3
I suspected that MTDateHeader would help me get this to work and, after much scrutiny, I conjured a solution which was MTDateFooter. The following code does pretty much what I want.
You're doing a little too much in a couple spots. Your code should work fine, but this'll make things a little simpler and easier to maintain, as you won't have to create yet another If should another blog get added:
<$mt:BlogID setvar="BlogID"$> <MTDateHeader> <div class="<$mt:Var name="BlogID"$>">(This is only the changed bits, obviously.)