No announcement yet.


  • Filter
  • Time
  • Show
Clear All
new posts

  • Mvt:Capture

    "Mvt:capture is the best thing to happen to SMT code since SMT code was created -- FIGHT ME!"

    Seriously. No more convoluted, escaped mvt:assigns, not more contorted code setups to deal with when variables are available, cleaner code, easier to update, blah, blah, blah....

    Oh, you want to know how it works...okay:

    Lets say you are in an array, and you want to create some content based on conditionals. Normally, you'd do something like:

          <mvt:if expr="l.settings:this:variable EQ 'soWhat'">
             <mvt:assign name="g.showThis" value="'<div class=\"mt-2 w-100\"><h2 class=\"float-left mr-3 mt-2 mb-1\">' $l.settings:someHeading$ '</h2><p class=\"mr-3 mt-2\">Some content here with a' $l.settings:withVariable$ '</p></div>'"/>
    Not bad...but editing, especially by non-SMT coders can be though...(think, apostrophe "d" as in don't...which you don't do, its "don\'t" of course.)

    Now, let me introduce you to Ms. Capture.

          <mvt:capture variable="g.showThis">
          <div class="mt-2 w-100"><h2 class="float-left mr-3 mt-2 mb-1">&mvt:someHead;</h2>
          <p class="mr-3 mt-2">Some content here with a &mvt:withVariable;</p></div>
    soooo much cleaner...even a cave person can update.
    Bruce Golub
    Phosphor Media - "Your Success is our Business"

    Improve Your Customer Service | Get MORE Customers | Edit CSS/Javascript/HTML Easily | Make Your Site Faster | Get Indexed by Google | Free Modules | Follow Us on Facebook

This website uses cookies to identify visitors, track visitors to our website, store login session information and to remember your user preferences. By continuing to use this site you agree to our use of cookies. Learn More.

This website uses cookies. By continuing to use this site you agree to our use of cookies. Learn More.