[Chameleon] Help on extending QueryResults in the Query Widget

Julien-Samuel Lacroix jlacroix at mapgears.com
Thu Aug 30 10:06:58 EDT 2007


Hi,

To that I can add that in 2.6beta1 it's now possible to have the query 
results inside 2 frames. One with minimal result info and the other with 
the details. To activate this, simply add:
IFRAMENAME="name_of_first_iframe.html"
DETAILIFRAMENAME="name_of_detail_iframe.html"

And control the number of fields viewable by setting the layer header or 
  by using the RESULT_FIELDS_LIMITED metadata field (comma separated 
list of available fields).

Julien

William Bronsema wrote:
> Hi Nelson,
> 
> You need to add the following to the top of the test_query.phtml page:
> 
> ****************
> 
> // define the path to the chameleon root fold (include closing "/")
> define( 'CHAMELEON_PATH', '/ms4w/apps/chameleon/htdocs/' );
> 
> // set the flag to setup the mapsession
> if ( !defined("LOAD_MAPSESSION") )
>     define("LOAD_MAPSESSION", 1);
> 
> include( CHAMELEON_PATH.'/widgets/session.inc.php' );
> include_once( CHAMELEON_PATH."/widgets/CWC2ButtonCache.php" );
> 
> ****************
> 
> 
> This will let you add the style line:
> 
> <link href="<?php echo $szCSSFile; ?>" rel="stylesheet" type="text/css">
> 
> Hope that helps.
> 
> Cheers,
> Bill
> 
> 
> William Bronsema
> Senior Applications Specialist
> DM Solutions Group Inc.
> 
> ___________________________________
> http://www.dmsolutions.ca
> 
> 
> -----Original Message-----
> From: chameleon-bounces at lists.maptools.org
> [mailto:chameleon-bounces at lists.maptools.org] On Behalf Of LITTLE Nelson
> Sent: Wednesday, August 29, 2007 9:23 PM
> To: chameleon at lists.maptools.org
> Subject: [Chameleon] Help on extending QueryResults in the Query Widget
> 
> Hi all,
> 
> Some background: 
> 
> I am trying to extend the Query widget by manipulating the formatValue()
> function in QueryResults.phtml. Basically I search the $value for a
> special value (eg "more_info://") and if that value is found I then
> manipulate the $retVal to be something like:
> 
> <a ref="test_query.phtml?mac=blah" target="_new">link</a>
> 
> This allows for the above embedded link to appear in the Query Results
> page which the user can now click to give more detailed results.
> 
> So far so good...
> 
> Problem:
> 
> I wish the test_query.phtml to have the same look and feel as the
> QueryResults.phtml page for consistency. How do I go about this? I
> notice that in the construction of the QueryResults.phtml page it uses
> things like:
> 
> 1. <title><?php echo $oMLT->get( 'QueryResults', '3', 'Query Results' );
> ?></title>
> 
> 2. <link href="<?php echo $szCSSFile; ?>" rel="stylesheet"
> type="text/css">
> 
> 3. <script language="JavaScript" src="<?php echo
> $_SESSION['gszCoreWebPath']; ?>/widgets/js/cwc_dhtml.js"
> type="text/javascript"></script>
> 
> 4. $szHTML .= makeButton( 'closeWindow', '', 'Query',
> "images/icon_close.png", $oMLT->get( 'common', 'Close', 'Close' ),
> $oMLT->get( 'common', 'CloseTip', 'Close Dialog' ), array( 'width' => 75
> ) );
> 
> How do I incorporate those things in my "test_query.phtml" page? 
> 
> Any help most gratefully appreciated.
> 
> -Nelson
> 
> Disclaimer :
> The contents of this e-mail including any attachments are intended only
> for the person or entity to which this e-mail is addressed.  If you are not,
> or believe you may not be, the intended recipient, please advise the sender
> immediately by return e-mail, delete this e-mail and destroy any copies.
> Tenix does not warrant nor guarantee that this email communication is free
> from errors, virus, interception or interference.
> 
> 
> _______________________________________________
> Chameleon mailing list
> Chameleon at lists.maptools.org
> http://lists.maptools.org/mailman/listinfo/chameleon
> 
> _______________________________________________
> Chameleon mailing list
> Chameleon at lists.maptools.org
> http://lists.maptools.org/mailman/listinfo/chameleon
> 

-- 
Julien-Samuel Lacroix
Mapgears
http://www.mapgears.com/


More information about the Chameleon mailing list