ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Pull today's weblog entries....

May 12, 2011 2:31pm

Subscribe [3]
  • #1 / May 12, 2011 2:31pm

    iPixel

    64 posts

    Im trying to pull all entries for “today” from weblog calendar. Why wont this work.

    {exp:weblog:entries weblog="calendar" sort="asc" status="Featured|Open"
    start_on="{current_time format='%Y-%m-%d 00:01'}” stop_before=”{current_time format='%Y-%m-%d 23:59'}” limit=“10” dynamic=“off”}

    I know for a fact that there are 2 entries for 05/12/2011 but only 1 shows.
    One is status Open and one is status Featured. Hence the piping.

    I’ve also even tried hard coding the date year=“2011” month=“05” day=“12” and still the same issue arises where only the ‘open’ status one shows but not the feature.

    Is there a better way to do this?

    Thanks!


    Update: I tried using year= month = day = again… aparently this only works correctly if you have show_future_entries=“yes”.

    {exp:weblog:entries weblog="calendar" sort="asc" status="Featured|Open"
    year="{current_time format='%Y'}” month=”{current_time format='%m'}” day=”{current_time format='%d'}” limit=“10” show_future_entries=“yes” dynamic=“off”}

    Which makes NO sense… because it does not show future entires, but at the same time does not show all of todays entries without it.

    Still looking forward to a better and cleaner solution if anyone has one.

  • #2 / May 13, 2011 6:02am

    John Henry Donovan

    12339 posts

    iPixel,

    When using the day=, month= or year= parameter then the limit parameter takes on another purpose. For example, display_by=“week” limit=“1” displays the last week of entries. Likewise display_by=“day” limit=“14” will show the last 14 days of entries

    {exp:weblog:entries weblog="calendar" sort="asc" status="not closed" display_by="day" limit="1"}

    Note if you display_by=“day” then it will show the last day that has entries.

  • #3 / May 13, 2011 9:48am

    iPixel

    64 posts

    So if i specify year/month/day with a limit of 10 shouldn’t that give me that last 10 entries of that day?
    Using display_by=”” really wouldnt allow me to say give me only the entries for date 05-12-2011, or would it?

  • #4 / May 15, 2011 12:38pm

    Greg Salt

    3988 posts

    Hi iPixel,

    This code should work:

    {exp:weblog:entries weblog="default_site" sort="asc" status="Featured|open" year="{current_time format='%Y'}" month="{current_time format='%m'}" day="{current_time format='%d'}" limit="10" show_future_entries="yes" dynamic="off"}

    What is your server time set to and is that the same as your account localization?

    Cheers

    Greg

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases