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.




  • 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:



    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

If you need to share template code, replace all the "<" signs with "&lt;" or use this utility.

Forum Groups

1773 6162

Last Topic: Excluding categories from blog by kholechek on Feb 9, 2012

86 302

Last Topic: website entries by masoud on Oct 26, 2011

1429 5077

Last Topic: What apocalypse hit this community in the middle of 2011? by 75th on Feb 10, 2012

695 2910

Last Topic: Insert Image / File Fails by Russ Miller on Feb 10, 2012

84 291

Last Topic: How to have some other characters in entry basename automatically written by Afshin Haghighatnia on Dec 22, 2011

173 737

Last Topic: About the MT version stated in HTML source by Alex E. Schneider on Feb 7, 2012

190 567

Last Topic: Analytics Reporting by michael webster on Feb 5, 2012

48 210

Last Topic: An idea and also a request by Afshin Haghighatnia on Jun 29, 2011

64 246

Last Topic: jQuery in MT 5.1 still at 1.4 - why? by perlmonkey on May 25, 2011

code.sixapart.com

137 478

Last Topic: Getting a thumbnail with xpath by Peter on Mar 13, 2011

222 720

Last Topic: Custom Field for Asset Not Appearing by android on Feb 9, 2012