[Chameleon] moving widgets into custom directories
wbronsema at dmsolutions.ca
Wed Jun 1 07:56:19 EDT 2005
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
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
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:
I could change this into:
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?
Bart van den Eijnden
2600 AG DELFT
email: BEN at Syncera-ITSolutions.nl
Chameleon mailing list
Chameleon at lists.maptools.org
More information about the Chameleon