I thought i had this working but i tried it today and it now seems to not work can someone please let me know what i am doing wrong? I really need this to work or im dead in the water.
I want it to show today's entries but if there were no entries today then show me the last 5 entries for today. WHat i did was set up a variable that recorded the entries and then tested that with if else. Why does this not work?
<mt:setvarblock name="entries-today"><mt:Entries days="1"></mt:Entries></mt:setvarblock>
<mt:if name="entries-today" lt="1">
<mt:Entries lastn="5">
<$mt:Include module="NJ-Entry Excerpt"$>
</mt:Entries>
<mt:else>
<h1 class="catagory-list-title">Today's Stories</h1>
<mt:Entries days="1" limit="5">
<$mt:Include module="NJ-Entry Excerpt"$>
</mt:Entries>
</mt:if>
I really need some help with this please.
Reported on Movable Type 4.3
Exactly what version of MT 4.3 are you running?
4.32
Yes, there is a bug in 4.33 that affects queries against date range (and authors). But since it's 4.32, this ain't it. Did you try opening a support ticket?
Thanks,
David
i just opened a ticket but i am not sure if my logic is sound or if the problem is with movable type. I have tried eveything under the sun to get this to work and nothing seems to do the trick. If anyone knows why this logic does not work or if there is better logic that does work please let me know.
It looks like you have an error in your first line of code. It will never output anything, even if there are multiple entries, because you have nothing in the mt:Entries block. You would need to replace this:
With some code like this:
That sets a new variable a 0, then increments it by 1 for each entry that happened in the last day.
Have you submitted a support request ticket yet? Has Matt's solution remedied the problem you experienced? Please let us know.
MT Support
We have identified your ticket and we are responding to it.
MT Support
We're working on it with you in Support now. Don't worry. We've got some assistance for you coming.
MT Support