Barebones Individual archive template
This is an archived entry from the Movable Type 3.2 beta test.
Entries from the current beta release (v3.3) can be found here.
As mentioned in many places on this site, the new template tag structure for the default templates has been greatly simplified, particularly the comment section of the individual archive template. Conversely, as many of you have also seen, the HTML structure got a bit more complicated for reasons we'll talk about shortly.
Some of you have asked for a bare-bones template with just the basic generic markup and the template tag structure with some commentary inside to make things more clear. As many of you know, I love to please, so I took a stab at the most obvious choice: the individual archive template. (UPDATE: More linked to from the end of the entry.)
This template contains most, but not all sections/features of the template tags used in 3.2. It does however contain all of the important ones. What it does NOT contain is the complex HTML from the regular default templates. For that reason, it's great for users of previous versions of Movable Type to use as a basis for integrating their current designs. If you are a new user, however, you'll want to stick to the default templates.
I'd be happy when/if I get a free second to do a few of the others if you still need them, but this one is the most crucial in terms of MT 3.2 changes. HTH!
More barebones templates:
- Main index by g026r
Posted on July 26, 2005 6:15 PM in Tips and tricks


Comments
Thanks jay. muy useful.
Is the template structure going to change much from now until the final 3.2 release?
Posted by: Justin Williams
|
July 26, 2005 7:15 PM
I doubt that the template structure in any of the template would change at all between now and launch. I think at this point, we're pretty set, barring any unforseen bugs.
Posted by: Jay Allen
|
July 26, 2005 7:16 PM
So it's safe to start working on new templates now?
Posted by: Sara
|
July 26, 2005 7:26 PM
Well, it's been safe since we released the new templates, which makes me think I'm misunderstanding your question. I think there have only been cosmetic changes to the templates since we released them in beta-2.
Posted by: Jay Allen
|
July 26, 2005 7:41 PM
Nope, not misunderstanding at all Jay. I just wanted to make sure the structure didn't change, but you answered that earlier.
Posted by: Sara
|
July 26, 2005 7:50 PM
Okay, cool. Customize away!
Posted by: Jay Allen
|
July 26, 2005 8:13 PM
Oh, one more thing I forgot: You can always use the MTCommentFields tag if you don't care about customizing every detail of the comment form. That tag is a complete replacement for the complex tag structure necessary to create the comment form.
You sacrifice control for ultimate simplicity. Not for everyone, but for some, the recommendation will be the best you've been given all week.
The reason we have never used MTCommentFields in the default templates is because many users will want to customize the section and it's an illustrative example of how the fields should be set up.
Hmm, now that I actually write that, it doesn't sound so smart...
Okay, informal non-binding poll: Should we be using MTCommentFields in the templates or stay with what we have today?
Posted by: Jay Allen
|
July 26, 2005 8:43 PM
Informal non-binding opinion from someone where it took a long time to get brave enough to dig into templates and really mess things up. ;P
I'd say let it stay as is, but be very, very clear in the documentation about this possibility of simplifying things down to the point of select from here to here, delete and inset MTCommentFields instead. Of course the drawbacks of doing so, should be highlighted so people can make an informed decision.
Posted by: Sara
|
July 26, 2005 8:59 PM
Simplify. Those that needs complex will hack what you put in there anyway.
Posted by: Justin Williams
|
July 26, 2005 9:07 PM
I think before you do replace it, I would like some explanation of how much of the form MTCommentFields replaces. From my initial test, it appears everything....
Posted by: dw
|
July 26, 2005 11:00 PM
could you post an example for a "recent comments" snipplet? My old one seems not to work any longer (had the archives\ hardcoded between the tags)
Posted by: Lutz-R. Frank
|
July 26, 2005 11:10 PM
That looks pretty slick, Jay. It's a lot cleaner than the stuff I currently have in my individual archive templates. Of course, the question is, how much hacking will I have to do to get it to look and feel the way I want it? :-)
Posted by: Nolan Winthrop
|
July 27, 2005 12:43 AM
Thank you for this, Jay. It helps a lot.
I think you should leave it how it is, but make the option of MTCommentsField more obvious.
Posted by: Elizabeth
|
July 27, 2005 6:14 AM
I agree completely with Sara's comments above.
I look forward to seeing the official release of MT 3.2. Can't wait!
Posted by: Kevin H. Stecyk
|
July 27, 2005 6:22 AM
Nods, as is where is - MTCommentFields as a default is totally inflexible for those who like to lay things out their own way..
I really like the idea of having barebones templates made available for all the templates (although not as primary default templates obviously) - they would make redesigning MT layouts much more user-friendly.
Posted by: demonsurfer
|
July 27, 2005 8:09 AM
Out of curiosity, I tried the MTCommentFields and got the following:
Posted by: GnomeGrrl
|
July 27, 2005 4:25 PM
Just wanted to add that I, too, would like to see a similar treatment for other templates as well. From my beginner's perspective, it is much easier to understand the tags when they are not obscured by presentation code. I've always been afraid of erasing something important; I am much more likely to experiment with this as a starting point.
Posted by: Elizabeth
|
July 27, 2005 7:29 PM
Okay, right now, we're a little short on manpower and we're trying to not only get the bugs fixed, but the docs ready and I have another 15 feature posts to get out plus some tutorials here on the beta blog.
It may be a little while until I can strip those down.
However, if any of you MT old-timers want to give it a shot, I'll be sure to link to it prominently.
Posted by: Jay Allen
|
July 27, 2005 7:57 PM
By the way, two more things:
Elizabeth, if you're a newbie, you'd be better in the end not touching the templates until the beta is finished.
Gnomegrrl, please file that bug. Thanks.
Posted by: Jay Allen
|
July 27, 2005 7:59 PM
I'll gladly take a shot at breaking down some of the other templates into bare-bones representations.
Anyone got a request for a specific one to start with? (Otherwise, I'll start with the Main Index.)
Posted by: g026r
|
July 27, 2005 8:28 PM
Grrrrrr.........
I just spent the last two hours carefully cleaning out almost every bit of html/css from the very template you just provided.
I hate you*.
I know, I know. I should have come a looking here first before plowing head first into the template.
Still, I hate you*.
Posted by: Rook
|
July 27, 2005 9:21 PM
Right, here we go:
Barebones Main Index template, available in two flavours:
If there are any errors, something doesn't make sense, or you just feel that something should be explained better, then let me know.
Oh, and I swiped your descriptions of MTIfCommentsActive and MTIfPingsActive, Jay. Hope you don't mind, but they were much better than anything I could have come up with.
I'll take a look at breaking down some of the other templates sometime tomorrow evening. Unless, of course, someone else does it first, or a general concensus is reached that my attempts stink. : )
Posted by: g026r
|
July 27, 2005 9:47 PM
Those are great! Thanks g026r! I'll add these to the main entry. No problem on reusing descriptions. Copying is the mark of a great writer -- or is that a plagiarist? I can never remember... :-)
Posted by: Jay Allen
|
July 27, 2005 10:16 PM
In MT3.2, tidy archvie file template is introduced. I guess %y -> yyyy, %m -> mm %f -> basename.html in individual archive template.
But if a user want to use file template like yyyy/mm/basename/index.html, he can't use MT 3.2's new tidy file template and must use old format like /index.html...
Why dont you introduce one like %b (pure basename not including .extention) ?
I tried %y/%m//index.html, but in this case, %y,%m doesnt work.
Posted by: Lee, Joon
|
July 28, 2005 12:10 AM
%b has already been checked in the code and first appeared in the July 25th nightly.
Posted by: Jay Allen
|
July 28, 2005 1:30 AM
In previous version, I seperated MTEntryAuthor and MTEntryAuthorNickname completly.
MTEntyAuthor is generally login ID which is required to enter MT main menu. So I used MTEntryAuthorNickname in Individual archive templates's' Posted by "[MTEntryAuthorNickname]" to reveal my MT login ID from visitors.
I thought this may be trivial but seperation between private MT login ID and public author (nick)name is important for security.
In MT3.2, new MTEntryAuthorDisplayName is introduced, and "by default" in Individual archive template, "Posted by [MTEntryAuthorDisplayName]" is used. I think seperation of two is being considered in 3.2
But, [MTEntryTrackbackData] in Individual archive template outputs [dc:creator="author name"] ie. MT login ID, as previous version, although an author sets "DisplayName". I think if a user set additional Username, he means hiding his login ID.
So in that case(setting DisaplyName definetly), I think it's right never to show author's login ID(user name) unless a user uses explicitly related tags like [MTEntryAuthor or MTEntryAuthorUsername]. Am I right?
I saw nightly version too. but as before, MTEntryTrackbackData's dc:creator value is author's user name not display name.
Can it be modified?
Posted by: Lee, Joon
|
July 28, 2005 5:23 AM
I agree with others: leave the simplest version in the templates, but provide the complexe version in the help. Perhaps even include a commented link to the updated version in the template.
Posted by: The Plaid Cow
|
July 28, 2005 5:52 AM
..anyone else getting 500 errors on trying to do a search with 3.2b-20050727 ?? (with search box provided for visitors to the blog)
Posted by: demonsurfer
|
July 28, 2005 8:53 AM
oops sorry, wrong thread
Posted by: demonsurfer
|
July 28, 2005 8:56 AM
FYI I get a rebuild error on the individual archive page now:
Building date-based archive 'Monthly20050701000000' failed: Build error in template 'Date-Based Archive': Error in tag: You used an 'MTEntryTitle' tag outside of the context of an entry; perhaps you mistakenly placed it outside of an 'MTEntries' container?
Posted by: demonsurfer
|
August 7, 2005 9:33 AM
FYI I get a rebuild error on the barebones individual archive page now:
Building date-based archive 'Monthly20050701000000' failed: Build error in template 'Date-Based Archive': Error in tag: You used an 'MTEntryTitle' tag outside of the context of an entry; perhaps you mistakenly placed it outside of an 'MTEntries' container?
Posted by: demonsurfer
|
August 7, 2005 9:33 AM
oh feck, never mind, I pasted it into the monthly rather than the individual template.. doh.. I'll try that one again..
Posted by: demonsurfer
|
August 7, 2005 9:40 AM