We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 10470
    • 48 Posts
    Hi,

    i am having a little problem with the the alt row parm. If i click on a link in the altrow template the formatting gets changed to the main formatting.

    does ditto have a current page template?

    g.

      • 21191
      • 236 Posts
      Paste in your call / the template your using and anything else. A problem well stated is a problem 1/2 solved.
        ~Shawn Himmelberger
        Check out my MODx Development and MODx Design Company - Himmelberger Design
        • 10470
        • 48 Posts
        Hi,

        i think this is the normal behaviour of ditto (prehaps a bug), i had a look at the code and it assigns a current template.

        if ($id == $modx->documentObject[’id’]) {
        $currentTPL = "tplCurrentDocument";
        }

        so i just commented this code out and and it now works the way i want.

        Having a current template is a nice undocumented feature, although it would be nice to be able to turn it off with out editing the code.

        g.
          • 21191
          • 236 Posts
          Well I’m glad you got it worked out.
            ~Shawn Himmelberger
            Check out my MODx Development and MODx Design Company - Himmelberger Design
            • 26439
            • 104 Posts
            I have the same problem, the styles I have defined in the tplaltrows `PortfolioTpl_alt` template aren’t showing up, do I have to go looking through the code to comment out as above or could there be something else going sideways here... ?

            My snippet call...

            [[Ditto? &summarize=`50` &tpl=`PortfolioTpl` $tplAltRows=`PortfolioTpl_alt` &sortBy=`menuindex` &sortDir=`DESC`]]
            


            The ModX search function returned "You may have meant to search for depilatories." btw.

              • 8960
              • 150 Posts
              scraf: I didn’t see which Ditto version you are using, but if it’s Ditto 2, tplAltRows doesn’t work anymore.

              Check out the Ditto 1 to 2 Upgrade Guide here: http://mirror3.cvsdude.com/trac/ditto/codebase/wiki/Upgrade#Version1to2

              This was recently discussed here: http://modxcms.com/forums/index.php/topic,12996.0.html

              Hope that helps.
                • 26439
                • 104 Posts
                That did help, thanks er16004. I have now Ditto2, which I didn’t know existed, but that will be one less hurdle to have to discover next time I’m ditto’ing something.

                In other news I’ve managed to solve my original problem.

                The (upgraded but still faulty) snippet call......

                [!Ditto? &extenders=`summary` &summarize=`50` &tpl=`PortfolioTpl` $tplAlt=`PortfolioTpl_alt` &sortBy=`menuindex` &sortDir=`DESC`!]
                


                The dollar sign before the tplAlt wasn’t helping matters rolleyes