[Chameleon] Renameing a modified Widget

Paul Spencer pspencer at dmsolutions.ca
Mon Mar 14 07:16:22 EST 2005


to rename a Widget, you have to do the following:

1. rename the directory the widget is in
2. rename the widget file
3. rename the class
4. rename the constructor

Optionally, you may have to rename other files and change references to 
them inside the code.

An example: Query.widget.php

chameleon/htdocs/widgets/Query -> chameleon/htdocs/widgets/MyQuery
Query.widget.php -> MyQuery.widget.php
class Query extends CWCWidget -> class MyQuery extends CWCWidget
function Query() -> function MyQuery()



Peter Thomann wrote:
> Ok my problem is that I have a changed query-widget for a special project.
> Cause I have a server running different maps I don't want the original
> query-widget to be overwritten by my changed one. I had the Idea to rename
> it  and some variables inside but it doesn't work. The changed widget is
> only changed in the way how to diplay some data. Is there an easy way how to
> rename it?
> Any suggestion are welcome
> Thank you Peter

More information about the Chameleon mailing list