Ok I’ve figured out a basic way to retrieve this via a ditto extender:
<?php
/* Filename: dittoinstance.extender.inc.php
* Title: Ditto Instance
* Purpose:
* Returns the instance ID of Ditto
*/
$placeholders['dittoinstance'] = array(array("returnDittoInstance"),"returnDittoInstance");
if (!function_exists("returnDittoInstance")) {
function returnDittoInstance() {
return substr($GLOBALS["dittoID"],0,-1);
}
}
?>
1. Save the file in your Ditto extenders directory
2. Include &extenders=`dittoinstance` in your Ditto call
3. Include the placeholder [+dittoinstance+] in your chunks
In case anyone here’s looking for a way to display content (typically in the same page) differently via PHx depending on which ditto instance is calling, the above will help.
Cheers,
Les