Help - Search - Members - Calendar
Full Version: MTEntries context
Movable Type Community Forum > Additional Resources > Tips and Tricks
gord
My problem is a little bit complicated.  I have a Recent Comments section in my sidebar.  My sidebar is a module which I MTInclude on every page.  The code I use to generate the 5 most recent comments is.

CODE
<h3>Recent Comments</h3>
     <p>
       <MTEntries recently_commented_on="5">
         <MTComments lastn="1">
          <a href="<$MTEntryLink$>#<$MTCommentID$>">
<$MTCommentAuthor$></a> on "<$MTEntryTitle$>".<br />
          </MTComments>
       </MTEntries>
      </p>


This generates the code properly for the main index.  But if you look at one of the category archives for example it changes the context of the MTEntries tag and only shows me the 5(or less if there aren't enough posts) comments in that Category.

Any ideas on how to keep the context of MT entries the same?
kadyellebee
Check out this recen thread.  I have my recent comments in an index template and then include it with PHP so that its the same on every page instead of getting the context of the archive its on.

Kristine
gord
Thanks.  I did the SSI with PHP and it is  functioning properly now.  That was an odd one.
bmk
It may look odd at first, but that's the way it's supposed to work, so you can use the tags in context for that category.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2009 Invision Power Services, Inc.