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.

Weekly archives?

November 27, 2007 8:31pm

Subscribe [6]
  • #1 / Nov 27, 2007 8:31pm

    Sam Stigler

    20 posts

    Hi,
      I’m trying to decide whether to use EE for my newspaper’s website, but I need to know… can it do weekly archives?

    Thanks,
    Sam

  • #2 / Nov 28, 2007 12:11am

    Bobby McGee

    132 posts

    Sure, with the display_by=“week” parameter.

  • #3 / Nov 28, 2007 12:43am

    Sam Stigler

    20 posts

    Ah, can’t believe I missed that!  Now if only there was a way to make the week start on a Friday…

  • #4 / Nov 28, 2007 12:44am

    Sam Stigler

    20 posts

    (Thanks for the tip.)

  • #5 / Nov 28, 2007 2:41am

    Bobby McGee

    132 posts

    The parameter is start_day=“Friday” 😊 Hope this helps.

  • #6 / Nov 28, 2007 2:47am

    Sam Stigler

    20 posts

    Cool; thanks.  In the docs it only says start_day can be Monday or Sunday.

  • #7 / Nov 28, 2007 12:19pm

    Robin Sowell

    13255 posts

    Good catch.  I’m thinking you might could go with stop_before and start_on parameters.  But the week limit would be nicer for what you need.  Might be a case for a feature request.

  • #8 / Dec 10, 2007 11:38am

    Reese Spykerman

    41 posts

    Hi there,
    Any thought on how I might use this and generate some subheaders of sort? Sort of like this:

    Week 1
    -link to weblog entry
    -link to weblog entry

    Week 2
    -link to weblog entry
    -link to weblog entry

    etc, etc. I have a client who is doing an ongoing ecourse, and we want to display her weblog entries by week, with a little header above them to group each week’s links. I’m in a creative rut as to how to make this happen 😊

  • #9 / Dec 10, 2007 11:45am

    Robin Sowell

    13255 posts

    I think you’re looking for the date heading variable pair- should do the trick.

  • #10 / Dec 10, 2007 11:53am

    Reese Spykerman

    41 posts

    ahh OK. 😊 So it might look something like this?:

    {date_heading display="weekly"}Week of {week_date format="%Y %m %d"}
    {exp:weblog:entries weblog="whatever" display_by="week"}
    {title}
    {/exp:weblog:entries}
    {/date_heading}

    which would output a listing similar to what I referenced above?
    Thanks Robin 😊

  • #11 / Dec 10, 2007 11:59am

    Robin Sowell

    13255 posts

    Sort of- but more like

    {exp:weblog:entries weblog="whatever" display_by="week"}
    {date_heading display="weekly"}Week of {week_date format="%Y %m %d"}{/date_heading} 
    {title}
    {/exp:weblog:entries}

    It works like the categories variable pair inside the weblog entries tag.  Er- well, not really.  But it needs to be inside the tag.

    However- if you’re using display_by week, you’ll only get one week’s worth on a page.  Still- you’ll have a date header in there.

  • #12 / Dec 10, 2007 1:22pm

    Reese Spykerman

    41 posts

    oy vey, I really should have caught that. LOL. I hopped back online because it occured to me it needed to be withIN the weblog entries tag.
    Sorry, and thanks for humoring me 😉

  • #13 / Jan 01, 2008 11:35pm

    Phil J Leitch

    92 posts

    Does show_current_week mean the most recent week with entries or the actual current week?

    I am using it and it doesn’t work the way I would expect, showing the current week and not the last week something was entered.

    I have a weblog with the newest entry being in August. When I show the current week for that weblog I want it to say “No entries for the week”.

    Which way is the parameter supposed to work? Also I know it was mentioned above but are Sunday and Monday the only options for start_day? I’d like my week to start on Thursdays (don’t ask!).

    Thanks
    p

  • #14 / Jan 02, 2008 7:03am

    Sue Crocker

    26054 posts

    Does show_current_week mean the most recent week with entries or the actual current week?

    It means the most recent week with entries.

    Sunday and Monday are the only variables.

    // date()‘s week variable ‘W’ starts weeks on Monday per ISO-8601.
                    // By default we start weeks on Sunday, so we need to do a little dance for
                    // entries made on Sundays to make sure they get placed in the right week heading
                    if (strtolower($TMPL->fetch_param(‘start_day’)) != ‘monday’ && date(‘w’, $LOC->set_localized_time($row[‘entry_date’])) == 0)

    start_day for other than Sunday/Monday is only available in mod.weblog.calendar.

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

ExpressionEngine News!

#eecms, #events, #releases