We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 4653
    • 30 Posts
    I’m trying to do the "I Like Button" but i have my problem with the current URL.

    i made a Chunk "currentUrl" with this code
    [[++site_url++]][[*id*]]
    ​

    and this code i put in my tpl:
    <iframe src="http://www.facebook.com/plugins/like.php?href=[[$currentUrl]]&layout=button_count&show_faces=true&width=450&action=like&colorscheme=light&height=21" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:100px; height:20px;" allowTransparency="true"></iframe>
    

    something is wrong but my chunk is working right.
    I’m working with the rev. 2.03

    all the best
    carol
      • 27708 MODX Staff
      • 2,502 Posts
      [[++site_url++]][[*id*]] is using the Evolution Syntax and should be this for Revo [[++site_url]][[*id]] or you can use which will write out the entire URL for the current page: [[~[[*id]]]]
        Author of zero books. Formerly of many strange things. Pairs well with meats. Conversations are magical experiences. He's dangerous around code but a markup magician. Blog ✦ Twitter ✦ LinkedIn ✦ GitHub
        • 4653
        • 30 Posts
        thanks smashingred, it works perfect ;-).

        all the best carol