display_by day, limit 1, not working
Posted: 09 May 2008 08:30 PM   [ Ignore ]  
Research Assistant
Avatar
RankRankRank
Total Posts:  608
Joined  05-16-2004

I’m trying to get just one day’s entries on a page, which should be possible, according to the docs.

http://expressionengine.com/docs/modules/weblog/parameters.html#par_display_by

Here’s my URL:
http://www.example.com/calendar/2008/04/09/

Here’s my tag:

{exp:weblog:entries weblog="calendar_events" orderby="date" sort="asc" status="not closed" show_future_entries="yes" show_expired="yes" limit="1" display_by="day" disable="category_fields|pagination|trackbacks"}

But that only returns one weblog entry, even though there are several entries for April 9.

I also tried dynamic=off:

{exp:weblog:entries weblog="calendar_events" orderby="date" sort="asc" status="not closed" show_future_entries="yes" show_expired="yes" limit="1" display_by="day" year="{segment_2}" month="{segment_3}" day="{segment_4}" dynamic="off" disable="category_fields|pagination|trackbacks"}

But it also only displays one entry, not one day’s entries.  I’m using EE 1.6.3 Build 20080319

TTFN
Travis

 Signature 

ExpressionEngine Roadshow - Vancouver BC - Sept. 26, 2008

Hop Studios Internet Consulting
http://www.hopstudios.com/

Profile
 
 
Posted: 11 May 2008 09:05 AM   [ Ignore ]   [ # 1 ]  
Moderator
Avatar
RankRankRankRankRankRankRank
Total Posts:  21199
Joined  05-20-2002

If you’re passing the day in the url like that?  You don’t want the display_by in there.  Take it out- up your limit to however many per page you want- see if it works.  It should.  Note - EE should pick up things automatically w/out the need for picking apart the url.  The calendar creates day links in a format that EE will recognize and limit by.

Make sense?

 Signature 

AKA rob1

Help Request Tips * Pro Network

Profile
 
 
Posted: 11 May 2008 10:48 AM   [ Ignore ]   [ # 2 ]  
Research Assistant
Avatar
RankRankRank
Total Posts:  608
Joined  05-16-2004

So that means that I need a different weblog entries tag for these URLs?  I want them all to show just one day’s worth of entries at a time.

http://www.example.com/calendar/2008/04/09/
http://www.example.com/calendar/2008/04/
http://www.example.com/calendar/

TTFN
Travis

 Signature 

ExpressionEngine Roadshow - Vancouver BC - Sept. 26, 2008

Hop Studios Internet Consulting
http://www.hopstudios.com/

Profile
 
 
Posted: 11 May 2008 10:54 AM   [ Ignore ]   [ # 3 ]  
Moderator
Avatar
RankRankRankRankRankRankRank
Total Posts:  21199
Joined  05-20-2002

Pretty much- though the /2008/04/ strikes me as tricky.  You’re pulling back the whole month, then trying to limit to a day’s worth.  But to show one day’s worth w/out passing anything in the url, you want display_by day- when you pass the day in the url, it doesn’t make sense to combine it w/display_by.  I wouldn’t have wanted to guess what would happen if you do- but since it didn’t work when you tried, looks like it jams things up.

 Signature 

AKA rob1

Help Request Tips * Pro Network

Profile
 
 
   
 
 
Post Marker Legend
New Topic New posts Hot Topic Hot Topic with new posts New Poll New Poll Moved Topic Moved Topic Sticky Topic Sticky topic
Old Topic No new posts Hot Old Topic Hot Topic with no new posts Old Poll Old Poll Closed Topic Closed Topic Announcement Announcements
Theme
Change Theme
Visitor Statistics
The most visitors ever was 1149, on July 16, 2007 10:33 AM
Total Registered Members: 61048 Total Logged-in Users: 16
Total Topics: 73849 Total Anonymous Users: 7
Total Replies: 398336 Total Guests: 405
Total Posts: 472185    
Members ( View Memberlist )