[Chameleon] moving widgets into custom directories

William Bronsema wbronsema at dmsolutions.ca
Wed Jun 1 07:56:19 EDT 2005

Hi Bart,

This is a messy type of situation.  I'm not sure what Paul has in mind to
address this, but here is what I have done in the past:

define( 'GQUERY_WEBPATH', 'http://'.$_SERVER['HTTP_HOST'].
                             dirname( $_SERVER['PHP_SELF'] ).'/' );

I define this right in the widget itself and then just pre-pend this to
whatever link I need.

There is a way to detect https vs. http, but I can't recall what that is
right now.



-----Original Message-----
From: chameleon-bounces at lists.maptools.org
[mailto:chameleon-bounces at lists.maptools.org] On Behalf Of Bart van den
Sent: Wednesday, June 01, 2005 5:58 AM
To: chameleon at lists.maptools.org
Subject: [Chameleon] moving widgets into custom directories

Hi list,

I am trying to move my self-made widgets into a custom directory. It works,
but only the popups (phtml files) are not found.

Is a widget aware of its web location? I guess not.

Or do I need to write the (relative) path in the widget.php file myself?

eg, now it says:

        $this->moPopup->mszLink =

I could change this into:

        $this->moPopup->mszLink =

But I would rather have the widget determine its web location automagically
..... or from configuration .....

Also, how does one deal with the includes for widget.php etc.? Those need to
be adapted as well.


Is there a directive just like COMMON to use for the CHAMELEON root widget
directory? That would come in handy.

Any best practices?

Best regards,

Bart van den Eijnden
Postbus 270
2600 AG  DELFT

tel.nr.: 015-7512436
email: BEN at Syncera-ITSolutions.nl

Chameleon mailing list
Chameleon at lists.maptools.org

More information about the Chameleon mailing list