-
- 116 Posts
I’m trying to return the full URL of the current page to put a link in a third-party button. It needs to work if friendly URL’s are on.
I think this is probably very simple, but I’m going round in circles here.
-
- 116 Posts
Cheers zi. I think there must be something in the process of actually writing down an issue that frees up a few braincells.
Quote from: natethomas at May 11, 2010, 08:07 PM
Thanks for that little code! Now it’s even easier to put together a simple facebook "like" link that checks out under w3c.
<iframe src="http://www.facebook.com/plugins/like.php?href=[(site_url)][~[*id*]~]&layout=standard&show_faces=false&width=450&action=like&font&colorscheme=light&height=35" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:270px; height:2.0em"></iframe>
I was looking at this for JUST THIS REASON. Awesome
Sal Baldovinos
SEO & DIGITAL MARKETING
ARIEL DIGITAL | Maximize Your Potential
www.arieldigitalmarketing.com
-
- 24,544 Posts
Or the snippet version:
/* ThisFullUrl Snippet */
$DocId = $modx->resource->get('id');
return $modx->makeUrl($docId, "", "", "full");