MTSomeDays
This container tag must is used to create a container which will encompass all of the other content that you wish to display. You will use it similar to the way that you use an MTEntries block (in fact, you will probably use an MTEntries block inside!), and make use of other tags inside to display other content. You must will probably add one or more attributes to the container to indicate how to retrieve your data.
Context is an important concept in MT-SomeDays, because it refers to the date that is being used during processing. If you don't know which date is in context, then you may not understand which date is being processed during a given loop. Template tags are provided that will allow you to troubleshoot your output and help determine what you are getting (those will be discussed later). If you don't understand what's happening, make sure you understand context, because that's where it all starts.
The first attribute is to adjust the current date. If not included, the current date context is used. This means that if you are building an individual archive, that entry's date is the one used. If a weekly or monthly archive, then the first date of that archive is the one that will be used. If there is no date in context, then the current system date will be used. To override this behavior, choose from this list: date, day, week, month or year.
The date attribute allows a value of first (first date with published entries), last (last date with published entries), today (current system date) or a specific date (YYYYMMDD).
The day attribute allows a value of last (the day prior to the one in context), next (the day after the one in context), -A (A days before the one in context) or +A (A days after the one in context).
The week attribute allows a value of last (seven days prior to the day in context), next (seven days after the day in context), -B (Bx7 days before the day in context) or +B (Bx7 days after the day in context).
The month attribute allows a value of last (one month prior to the day in context), next (one month after the day in context), -C (C months before the day in context) or +C (C months after the day in context).
The year attribute allows a value of last (one year prior to the day in context), next (one year after the day in context), -D (D years before the day in context) or +D (D months after the day in context).
Each of these options manipulates the starting date context. For instance, if the context of your template is Friday, February 16, 2007, and you specify week="last", the context of your container shifts to one week prior - in other words, Friday, February 9, 2007. So processing will begin at that point.
Now that we have selected the date that will be used for our starting point, we need to tell the container which other dates we would like to include. For that, enter the select attribute.
This attribute can accept a value of since (everything since the first date with published entries through the evaluated date), until (everything from the evaluated date until the last date with published entries), week (a calendar week), month (a calendar month), year (a calendar year), -E (the prior E days, inclusive) or +E (the next E days, inclusive).
Going back to our last example, if we add select="until" to the container, we will get everything from Friday, February 9, 2007 until the last date that contains published entries (whenever that date happens to be). But using the two attributes together, you can adjust the date and select a range of just about anything!
There are also some attributes that you can add to the container that will affect your output, but don't directly apply to adjusting the date or selecting a range.
The limit attribute may come in useful if you want to ony include a certain number of entries. Because MT-Somedays overrides the standard MTEntries container, you can't use normal tags there, so you need to use it here. The value should be the number that you would like to limit (for instance, limit="12").
The nocats attribute will override the default behavior of MT-SomeDays, which is to look at the current category context. This simply turns off that behavior and allows you to view content from all categories. The value should be "1".
The padding attrbute works much like the regular calendar tags, and allows you to create table-like calendars, with blank cells at the beginning and end, with columns lining up correctly. The value should be "1".
The reverse attribute allows you to list your dates in reverse order. The value should be "1".
The yearly attribute allows you to select all months from the range you are building by extending the date range so that it nicludes the first date of the year (January 1) and the last date of the year (December 31). If your date range is only in a single year, you can get the same results by specifying select="year", but if your range spans more than one year, you'll need to use this attribute. The value should be "1".
