Talk:Related Entries - Hiranyaloka/Documentation GitHub Wiki

Using this code with MT Pro 4.21 I always get an error: "Error in <mtentries></mtentries> tag: You have an error in your 'tag' attribute: competition OR japan OR space OR spaceelevator OR spacetravel OR spaceward OR times"

Removing the 'normalize="1"' from <$mt:TagName$> solved the problem and seemed to have no adverse affects regarding tags with spaces in. I'm hesitating to correct the code because according to the MT documentation, normalize should work...

-Philgyford 03:24, 9 October 2008 (PST)


Using the recipe I was still seeing the current entry (or page) being included in the related list, but replacing eq= with like= solved it because it matches the current entry variable ignoring the whitespace and formatting.

-Jamison 15:33, 22 February 2008 (PST)


I tried this recipe with pages (not entries), but first it returned nothing, and then it insisted on spewing out the current page too. After much headache, heartburn and other sundry ailments, I went back to the stagernation Compare plugin, as I found the <mt:unless> comparison function (with a setting of eq= or even ne=) just did not work.

I finally came up with this code, which works fine:

&amp;lt&#59;mt&#58;pageiftagged&amp;gt&#59;
    &amp;lt&#59;mt&#58;setvarblock name&#61;&quot;curpage&quot;&amp;gt&#59;
        &amp;lt&#59;mt&#58;pageid /&amp;gt&#59;
    &amp;lt&#59;/mt&#58;setvarblock&amp;gt&#59;
    &amp;lt&#59;mt&#58;setvarblock name&#61;&quot;relatedtags&quot;&amp;gt&#59;
        &amp;lt&#59;mt&#58;pagetags glue&#61;&quot;,&quot;&amp;gt&#59;
            &amp;lt&#59;mt&#58;tagname /&amp;gt&#59;
        &amp;lt&#59;/mt&#58;pagetags&amp;gt&#59;
    &amp;lt&#59;/mt&#58;setvarblock&amp;gt&#59;
    &amp;lt&#59;mt&#58;setvarblock name&#61;&quot;listitems&quot;&amp;gt&#59;
        &amp;lt&#59;mt&#58;pages tags&#61;&quot;$relatedtags&quot;&amp;gt&#59;
            &amp;lt&#59;mt&#58;setvarblock name&#61;&quot;listpage&quot;&amp;gt&#59;
                &amp;lt&#59;mt&#58;pageid /&amp;gt&#59;
            &amp;lt&#59;/mt&#58;setvarblock&amp;gt&#59;
            &amp;lt&#59;MTIfNotEqual a&#61;&quot;&#91;MTGetVar name&#61;&#39;listpage&#39;&#93;&quot; 
                  b&#61;&quot;&#91;MTGetVar name&#61;&#39;curpage&#39;&#93;&quot; numeric&#61;&quot;1&quot;&amp;gt&#59;
                &amp;lt&#59;li&amp;gt&#59;&amp;lt&#59;a href&#61;&quot;&amp;lt&#59;mt&#58;pagepermalink /&amp;gt&#59;&quot;&amp;gt&#59;&amp;lt&#59;mt&#58;pagetitle /&amp;gt&#59;&amp;lt&#59;/a&amp;gt&#59;&amp;lt&#59;/li&amp;gt&#59;
            &amp;lt&#59;/MTIfNotEqual&amp;gt&#59;
        &amp;lt&#59;/mt&#58;pages&amp;gt&#59;
    &amp;lt&#59;/mt&#58;setvarblock&amp;gt&#59;
    &amp;lt&#59;mt&#58;if name&#61;&quot;listitems&quot;&amp;gt&#59;
        &amp;lt&#59;h5&amp;gt&#59;Related Pages&amp;lt&#59;/h5&amp;gt&#59;
        &amp;lt&#59;mt&#58;var name&#61;&quot;listitems&quot;&amp;gt&#59;
    &amp;lt&#59;/mt&#58;if&amp;gt&#59;
&amp;lt&#59;/mt&#58;pageiftagged&amp;gt&#59;

Note that there are significant differences in my recipe. For one thing, the glue=" OR " threw the whole thing right out of whack. Second, in the original recipe there is an <li> formatting at two places. It should just be in the first, not in the actual printing section.

Hope this helps.

No discussion on the wiki page

There's a discussion page here for discussion. Please use it or, preferably, just fix the thing you're saying is broken. It's the wiki way... - Jayallen 02:57, 26 September 2008 (UTC)

include_private="1" fails (for me)

This modifier is poorly (or not at all) documented, but after failing to extract the @private tags to a variable, I eventually tested the <mt:entrytags include_private="1"></mt:entrytags> method if it would return any @private tags and it didn't. (MT Pro 4.25, same with developer's version of MT 4.25). I use dynamic publishing for archive entries. I've seen this modifier quoted numerous times, but is it properly implemented?

⚠️ **GitHub.com Fallback** ⚠️