default userpic

categoryDescription Tag out of context?

Vote 0 Votes

greetings everyone... anyway, problem. In 4.1 I had this working where the category description would display in each category but now with 4.2, I cannot seem to get this to work, it keeps saying:

Publish error in template 'Entry Listing': Error in tag: You used an tag outside of the proper context.

Doesn't matter what template, module, etc I put this, I keep getting the same problem. Any ideas?

Reported on Movable Type 4.2

9 Replies

| Add a Reply
  • Possible to see the relevant portion of your template code?

  • I would post it here but I cannot seem to get the code to display here. This Markdown method to display things here isn't working for me. It blocks out like 80% of the code I enter in when I preview it... bad reply editor system here. Is there a better way to post code here?

  • Yes, that's a real bummer. Thing to do is to leave about 6 to 8 spaces at the beginning of each line. Then it works. Examples below.

      <!-- left six spaces -->
        <mt:entries lastn="2">
          <mt:entrytitle remove_html="1">
        </mt:entries
      <!-- see what I mean? -->
    
  • Or can you send it to me, zipped at gautampatel [at] gmail dot com? Thanks.

  • hmmm.. I tried to do as you said and a couple other methods but it's just not cooperating here in this type of forum system. I tried one other method but only bits and pieces were showing with a lot of space between. I will email you the code then.

  •     Ah, I just tried it again this time without a large amount of code, just put in 4 lines and did the 6-8 spaces before each line and it worked. So I guess this reply editor does not handle larger code amounts but if it needs a few spaces before each line, that's something someone should look into. But anyway, issue at hand, I just sent the zip file.
    

    Thanks in advance...greatly appreciate this.

  • Hi Joey,

    What you need to do is this:

           <mt:IfArchiveType archive_type="Category">
             <mt:categorydescription>
           </mt:ifArchiveType>
    

    Since you're using a generic archive template that determines what to show depending on what archive is being sought, this will work if/when it detects that the archive type is category.

    Remember that you must have category archives enabled. If you've disabled them (deleted the category archive template), nothing will happen. So make sure you have category archives and use this in your code.

  • Ok that's cool...it worked! Many thanks! I also remembered that when I had the description working before, I was using the Classic Blog setup in MT 4.1 and now I am using the community blog type for MT 4.21. The templates are very different.

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