user-pic

'AltTemplate' directive

Vote 0 Votes

Trying to get upgraded to MT 4.2 by using a fresh install. I'm to the point of copying the directives from my MT 3.33 config file to the MT4 config file and I came across this:

AltTemplate comments comments.tmpl

It seems to have something to do with search templates (and I know it's depreciated for MT 4.2), but I can't tell from the documentation. I certainly don't think I've ever created a custom search template and if I did I'm not sure why I'd name it 'comments'. There are two values for this directive, but I'm not at all sure what they both do. The second seems to be a file specification, but I'm not at all sure what the first is for.

I'm currently not able to access the templates in my MT 3.33 install, so I can't look and see if there's something in there that sheds light on this. (It's a plug in problem that will hopefully that will be resolved very soon.) Still, the documentation doesn't seem to explain what the directive does.

Can anyone clarify?

Reported on Movable Type 4.2

5 Replies

| Add a Reply
  • This documentation? Because it explains plenty to me. What is it you're not understanding? The linked SearchAltTemplate docs are even more explicit and may help.

  • Yep, it says nothing about the middle part of the directive. The example they use is this:

    AltTemplate work work.tmpl The description of what that does is: This sets up the alternate template for the "work" search. OK, what's a "work" search? How would I perform a "work" search and what does that mean? In my example above, I guess I'm defining a "comments" search. What is that? I obviously knew at one time, 'cause I set it up, but I can't figure it out now.

    Is "work" or "comments" simply the name of this custom search? Actually, now that I've made that assumption, it's starting to make sense. Nowhere in those docs does it indicate that that second bit is simply the name of the search.

    It's been a long time since I did any set up work on my blog. :-P

  • (You know, this forum really needs some formatting controls. Here's what I meant:)

    Yep, it says nothing about the middle part of the directive. The example they use is this:

    AltTemplate work work.tmpl

    The description of what that does is:

    This sets up the alternate template for the "work" search. OK, what's a "work" search? How would I perform a "work" search and what does that mean? In my example above, I guess I'm defining a "comments" search. What is that? I obviously knew at one time, 'cause I set it up, but I can't figure it out now.

    Is "work" or "comments" simply the name of this custom search? Actually, now that I've made that assumption, it's starting to make sense. Nowhere in those docs does it indicate that that second bit is simply the name of the search.

    It's been a long time since I did any set up work on my blog. :-P

  • Ah, okay. The middle bit is more or less an identifier for purposes of using that template. Remember you can use this directive to create multiple alternate search templates.

    You'd then use that identifier as part of your search form to tell it which one to use. See the SeartAltTemplate docs for a snippet.

    As to why it's there at all(back to the original question), I can't help you. This is a completely manual deal, so at some point a human did that.

  • OK, that makes some sense. The human that did it had to be me, I just have no recollection of it. :-P

    Thanks Su.

Add a Reply

Forum Groups

151 405

Last Topic: MT Interface Missing by Sherri on Nov 10, 2008

36 144

Last Topic: Installation can't finish by Drazend on Nov 10, 2008

34 93

Last Topic: Creating your own Plug-in by jondauz on Nov 5, 2008

10 33

Last Topic: new licensing confusion by Neil Epstein on Aug 14, 2008

code.sixapart.com

62 226

Last Topic: Callback after blog publishing. by Tomato Interactive on Oct 27, 2008

34 98

Last Topic: Ajax Rating Plugin by kiran on Oct 17, 2008