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.

Archive Day links tag

August 13, 2008 11:05am

Subscribe [1]
  • #1 / Aug 13, 2008 11:05am

    bb6600

    13 posts

    First of all, I want to say Hi to everyone as this is my first post here.

    Now to the matter at hand: Is there any way to mimic the Archive Month Links tag functionality for Days (or Weeks), instead of Months?

    My weblog setup is fairly unique. I’m posting a bunch of entries on Mondays only. These will only get displayed as a daily archive (no individual pages for each entry) so I need a proper method of navigating from one day’s entries to the previous/next. I can get the pagination working by using the [display_by=“day”] property but I would like the date to show up in the URL, instead of the classic page number. Basically, show the URLs as “/weblog/2008-08-11/” or at least “/weblog/2008/08/11/”, instead of “/weblog/P1/”.

    An alternative would be to address this as magazine issues, i.e. “/weblog/1/” for the first set of entries, “/weblog/2/” for the second, and so on.

    Any ideas will be more than welcome.

    PS: I can’t group all of the daily entries in one big entry as each one needs to have its own category.

  • #2 / Aug 14, 2008 1:07pm

    bb6600

    13 posts

    Sorry but I have to bump it as I’m quite short on time for a solution on this.

    Do you think it’s at least possible to get something like this working? Yes? No? Anyone? Please 😊

  • #3 / Aug 20, 2008 6:10pm

    bb6600

    13 posts

    Ok, so I’ve got it to work so that if I navigate to “/weblog/2008/08/11/” it will display all the entries for that day.

    The problem is now the pagination. How can I dynamically create a link to the previous and/or next days? Do date parameters work inside a SQL queries via the Query module?
    Something like: { exp:query sql="SELECT entry_date FROM exp_weblog_titles WHERE entry_date<{ entry_date}”} ???


    PS: Not really feeling the love from the ‘How To’ community so far… :(

  • #4 / Aug 20, 2008 10:34pm

    Robin Sowell

    13255 posts

    It’s a tricky question- the only time I did something similar, I cannibalized the calendar.  But for what you’re doing- the simple way would be to use display_by=“day” limit=“1”

    {exp:weblog:entries weblog="blog" display_by="day" limit="1"}
    {title} - {entry_date format="%Y %m %d"}
    
    {paginate}
    Page {current_page} of {total_pages} pages {pagination_links}
    {/paginate}
    {/exp:weblog:entries}

    Not the kind of urls you were wanting.  But it’s simple.

  • #5 / Aug 20, 2008 11:39pm

    bb6600

    13 posts

    I did all that with the display_by=“day” but I really need the URLs to show the date instead of the default “P0”, “P1”, etc. You’re saying it’s possible to get it working somehow via the calendar tag?

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

ExpressionEngine News!

#eecms, #events, #releases