We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 41479
    • 5 Posts
    Hi, I got sth simple like:
    <?php
    $output = '';
    $docInfo = $modx->documentObject;
    
    $output .= '<div class="color_code">
                    <strong>Color code</strong>';
    
    if ($docInfo['description'] != '')
    {
    $output .='<p>EU '.$docInfo['description'].' <img src="assets/images/nfm/c_'.$docInfo['description'].'.png"  alt="EU '.$docInfo['description'].'" /></p>';
    }
    if ($docInfo['introtext'] != '')
    {
    $output .='<p>USA '.$docInfo['introtext'].' <img src="assets/images/nfm/c_'.$docInfo['introtext'].'.png"  alt="USA '.$docInfo['introtext'].'" /></p>';
    }
    
    $output .=  '</div>';
    
    return $output;
    in my evo site. How can I change it into sth that will work in revo?

    Regards,

    Mike
      • 28042 ☆ A M B ☆
      • 24,524 Posts
      Use the $modx->resource object.

      http://bobsguides.com/revolution-objects.html
        Studying MODX in the desert - http://sottwell.com
        Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
        Join the Slack Community - http://modx.org