This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Usage: [[redirect? &id=`123`]] | |
$url = $modx->makeUrl($id); | |
return $modx->sendRedirect($url); | |
?> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Forget the snippet, use the following placeholder: | |
// [[++http_host]] | |
// Thanks to @curiositymind @mark_hamstra |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* Virtual aliases | |
* Patrick Nijkamp | |
* http://www.1-vision.nl | |
* When installed create a property in the DEFAULT property set called "tvID" | |
* and fill it with the ID of the TV that hold's the old URL. | |
* Old URL's without '/' at the start. | |
*/ | |
$aliasTvId = $scriptProperties['tvId']; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** <?php | |
* getReqParam | |
* | |
* Copyright 2010 by Shaun McCormick <shaun@collabpad.com> | |
* | |
* getReqParam is free software; you can redistribute it and/or modify it under | |
* the terms of the GNU General Public License as published by the Free Software | |
* Foundation; either version 2 of the License, or (at your option) any later | |
* version. | |
* |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** <?php | |
* | |
* getUrlParam | |
* | |
* A simple snippet to return a value passed through a URL parameter. | |
* | |
* @ author Paul Merchant | |
* @ copyright 2010 Paul Merchant | |
* @ version 1.0.0 - October 15, 2010 | |
* @ MIT License |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
global $modx; | |
$doc = $modx->getDocument($id); | |
$output = ''; | |
if(!empty($doc)) | |
$output = "<a title='".$doc[' pagetitle']."' href='".$modx->makeUrl($id, '', '', | |
'full')."'>".$doc['pagetitle']."</a>"; |
NewerOlder