We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 12793
    • 293 Posts
    Thanks for your reply!!


    I think that create a document for every page is very long......suppose that I’ve 50 pages??

    and if each pages as a view and controller ... do I’ve to create 100 documents (view + controller)???


    Ins’t possibile to create a iframe where to put my application

    or... there are other applications??



    I think that this is an usual problem for CMS solutions


    Thanks
      • 3749
      • 24,544 Posts
      If you have an app with 50 separate PHP files, there may be no simple way to have it work within MODx. You may have to leave it as a standalone app and style the pages to look like your MODx site.
        Did I help you? Buy me a beer
        Get my Book: MODX:The Official Guide
        MODX info for everyone: http://bobsguides.com/modx.html
        My MODX Extras
        Bob's Guides is now hosted at A2 MODX Hosting
        • 4172
        • 5,888 Posts
        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:
        &task=detail&detailID=12


        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
          -------------------------------

          you can buy me a beer, if you like MIGX

          http://webcmsolutions.de/migx.html

          Thanks!
          • 12793
          • 293 Posts
          Thanks for your reply!!!

          I like your solution!!! I’ve only these question:

          1) what is it bloX??

          2) $tasks=array(’detail’,’list’,’listmanager’);
          in this array I’ve to insert all my pages?? (views and controller??)
          why do you haven’t inserted detailmanage?
          I think that if manager pages are included by view I’ve only insert view in array.... what do you think abou this?


          3)$_GET[’ID’]=isset($_GET[’detail’.$_GET[’task’]])?$_GET[’detail’.$_GET[’task’]]:null;
          include($modx->config[’base_path’].’assets/yourfilepath/’.$_GET[’task’].’.php’);

          this code is OK! but Why you don’t use the ID for call detail page? (I mean the ID of selected record)
          you include a page (for example assets/yourfilepath/detail.php) ... but the ID??

          Thanks!!