Help - Search - Members - Calendar
Full Version: MTEntryTitle Error
Movable Type Community Forum > Additional Resources > Tips and Tricks
jeremy_tai
I'm trying to list an MTEntryTitle in two places in the same document but outside of the MTEntries tag and I keep getting the following error when i try to rebuild:

QUOTE
Build error in template 'Biography Index': 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?


Any ideas why this isn't rebuilding? My code is below:

CODE
<? include("../_inc/doctype.txt") ?>

    <title>Some Website / Biography / <$MTEntryTitle$></title>
    
<? include("../_inc/meta.txt") ?>
<? include("../_inc/nonstandard.txt") ?>


<div id="container">

<? include("../_inc/logomenu_inner.txt") ?>  
    
    <div id="contentwrap">
    
    <!-- CONTENT -->
    <div id="contentcenter">
       <div class="inside">
<MTEntries>
    <h4><$MTEntryTitle$></h4>
   <$MTEntryBody$>
</MTEntries>


    </div></div><!-- CONTENT close -->
    
    <!-- RIGHT SIDEBAR -->
    <div id="contentright">
       <div class="inside">
 <ul>
     <li><MTEntries sort_by="title" sort_order="descend"><a href="<$MTEntryPermalink$>"><$MTEntryTitle$></a></MTEntries></li>
 </ul>

    <div class="dotted"></div>
 
    <p><span class="tools">Download <$MTEntryTitle$>'s biography:</span><br />    
  <img src="/_img/download_txt.gif" width="22" height="24">
         <img src="../_img/download_pdf.gif" width="23" height="24">
   </p>
    
    <div class="dotted"></div>
    
    </div></div><!-- RIGHT SIDEBAR close -->
    
    <? include("../_inc/footer_inner.txt") ?>
    
    </div><!-- close contentwrap -->
</div><!-- close container -->
    
    
</body>
</html>
kadyellebee
It looks like this is an Index template? If so, then there's a chance that MTEntries would have more than one EntryTitle... so the MTEntryTitle in the header doesn't know where to get that info from.

I'd suggest taking the MTEntryTitle tag out of your <title> container. The other two instances of MTEntryTitle should be okay. smile.gif

Kristine
jeremy_tai
Thanks Kristine,
It appears to rebuild now without any errors.
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.