It's markdown and it's a little confusing! Click the link just above the reply box for a description, but the easiest way to make sure your code works is to insert 4 spaces before each line.
Personally I'm not a fan of markdown either, but I think it's here to stay (at least until they get the RTE working in comments/new threads)
Not really sure what you're trying to do. Let me see if I can translate this:
If variable called thedate is not the same as the Entry Date in Month Day, Year format, THEN: show the entry date in the Month Day, Year format.
So you want to show only those entry dates that do not match your variable, thedate.
You have defined the variable thedate to be the EntryDate itself, and then, with the if function, you want only those entries where their own entrydates are not their entrydates ... duh? Lost there. As far as I can tell, this is bound to give you a blank result, as there is no case where an entry's date doesn't match itself.
Your setvarblock also needs to be at the top, not at the bottom.
Actually, what I was trying to do was to display the date only if it was the first listed post in the span of a day. Like, if you make two posts in one day and you list only the titles of those posts, it doesn't post the date for each post, only one date per day. I figured out how to to it, but I'm still not sure how to post code here correctly...
<!--<mt:SetVar name="thedate" value="nothing"> <mt:Entries> <mt:If name="thedate" ne=<$mt:EntryDate format="%B %d, %Y"$>> <div id="date"> <$mt:EntryDate format="%B %d, %Y"$> </div> </mt:If> <h2><a href="<$mt:EntryLink$>"><$mt:EntryTitle$></h2></a> <mt:SetVarBlock name="thedate"><$mt:EntryDate format="%B %d, %Y"$></mt:SetVarBlock> </mt:Entries> -->I can't post my code. WTF. How am I supposed to get help with my code if I can't post my code?
Hi, I've just fixed your code. Sorry for the confusion!
Hi, I've just fixed your code. Sorry for the confusion!
It's markdown and it's a little confusing! Click the link just above the reply box for a description, but the easiest way to make sure your code works is to insert 4 spaces before each line.
Personally I'm not a fan of markdown either, but I think it's here to stay (at least until they get the RTE working in comments/new threads)
@Chinagreenelvis
Not really sure what you're trying to do. Let me see if I can translate this:
So you want to show only those entry dates that do not match your variable, thedate.
You have defined the variable thedate to be the EntryDate itself, and then, with the if function, you want only those entries where their own entrydates are not their entrydates ... duh? Lost there. As far as I can tell, this is bound to give you a blank result, as there is no case where an entry's date doesn't match itself.
Your setvarblock also needs to be at the top, not at the bottom.
If you tried this:
It should work. This way you will show only entries that are not made today. I presume you want something like that.
Note, BTW, that your mt:if statement was incorrectly coded. There should be a double-quote (") between the last two > signs.
Hope this helps. If it doesn't ... I tried ...
Actually, what I was trying to do was to display the date only if it was the first listed post in the span of a day. Like, if you make two posts in one day and you list only the titles of those posts, it doesn't post the date for each post, only one date per day. I figured out how to to it, but I'm still not sure how to post code here correctly...
Unless I'm unaware of some other detail in your template that precludes it, this is what the DateHeader container is for.
Unless I'm unaware of some other detail in your template that precludes it, this is what the DateHeader container is for.
Wow. That tag totally does exactly what I used crazy variable functions to achieve. Thanks!