Suppose that I’ve these pages:
list.php
listmananager.php
the allow to show records
detail.php
detailmanager.php
that allow to show detail of each record, selecting a specific record of the list
in each row of list grid I’ve a link like this detail.php?ID=12 for open each detail page
I’d like to include the list of records page (in modx template) and when a user select a record open the detail page (in modx template)
Can you tell me the solution that I’ve to use?
I think you have to rewrite your Links like this for example:
then you can have a snippet with something like that:
<?php
$tasks=array('detail','list','listmanager');
if (isset($_GET['task'])&&in_array($_GET['task'],$tasks)){
$_GET['ID']=isset($_GET['detail'.$_GET['task']])?$_GET['detail'.$_GET['task']]:null;
include($modx->config['base_path'].'assets/yourfilepath/'.$_GET['task'].'.php');
}
One example, how this technik works in modx can you see here:
http://www.rgmarktheidenfeld.de/ (German)
all events are in own database, listed with bloX, also minicalender is done with bloX.
you see the links for detail-page or links to other month and so on? they go all to same modx-ressource, but bloX shows different contents, depending on links.
another example on this page is the integrated vanilla-forum. Here i have one modx-ressource with snippet-call [!vanilla!] All links are rewritten with rewrite-rules and vanillas integrated rewrite-functions