|
Previous
·
Next
|
bernd
|
Date: 5/1/2008 3:01 pm · Subject: Extending the RandomAssetProxy by a templateID argument · Rating: 0
Hi there,
I want to extend the RandomAssetProxy such that it takes a template ID as the second argument (for overriding the default one of the proxied asset). In principle, this is similar to the shortcut override functionality.
I noticed that there is only a get method defined fo retrieving properties of assets, i.e. it does not seem to be possible to change the template ID of an asset object. Is this correct?
If that is the case, I assume one has to define a new class that inherits from Asset and overrides the get method. If the templateID is requested one simply returns the one that has been specified when the constructor was called. Would that work? Or is there an easier way?
-- Trying to build a non-profit community portal for free-climbers around Magdeburg/Germany. Check out http://kletterfreunde-md.kashyyyk.de (under construction).
|
| Back to Top |
Rate [ | ]
|
| |
bernd
|
Date: 5/2/2008 1:40 pm · Subject: Re: Extending the RandomAssetProxy by a templateID argument · Rating: 0
I am already stuck. To start with, I copied the file RandomAssetProxy.pm
to N?RandomAssetProxy.pm in the macro folder, changed the package name
to WebGUI::Macro::NRandomAssetProxy and made an entry to the config file
of the site ("NRandomAssetProxy" : "NRandomAssetProxy",). That is
everything described in the wiki. Still, the macro is not resolved and
all I get is a "^NRandomAssetProxy()" when I use it in a template.
The original RandomAssetProxy still works fine. What did I miss?
I did a restart of the whole system. Permissions of the new file are
also fine. WebGUI version is 7.4.34.
|
| Back to Top |
Rate [ | ]
|
| |
martink
|
Date: 5/3/2008 7:00 am · Subject: Re: Extending the RandomAssetProxy by a templateID argument · Rating: 0
After changing your config you must also restart your mod_perl server.
Martin
spunky@kashyyyk.de wrote:
> bernd wrote:
>
> I am already stuck. To start with, I copied the file RandomAssetProxy.pm
> to N?RandomAssetProxy.pm in the macro folder, changed the package name
> to WebGUI::Macro::NRandomAssetProxy and made an entry to the config file
> of the site ("NRandomAssetProxy" : "NRandomAssetProxy",). That is
> everything described in the wiki. Still, the macro is not resolved and
> all I get is a "^NRandomAssetProxy()" when I use it in a template.
> The original RandomAssetProxy still works fine. What did I miss?
> I did a restart of the whole system. Permissions of the new file are
> also fine. WebGUI version is 7.4.34.
>
>
>
> http://www.plainblack.com/webgui/dev/discuss/extending-the-randomassetproxy-by-a-templateid-argument/1
>
> ------------------------------------------------------------------------
>
>
>
>
|
| Back to Top |
Rate [ | ]
|
| |
bernd
|
Date: 5/3/2008 10:46 am · Subject: Re: Extending the RandomAssetProxy by a templateID argument · Rating: 0
> After changing your config you must also restart your mod_perl server.
>
> Martin
I think that is what I did. I used the unix init script that ships with
WRE. I requested a restart with /etc/init.d/webgui restart. The script
than calls "/data/wre/sbin/wreservice.pl --quiet --restart" which
includes a restart of the mod_perl server!?
|
| Back to Top |
Rate [ | ]
|
| |
|
|
Re: How to connect a Profile Field to a User Group? by LoopSetShop - Sun @ 11:13am Re: How to connect a Profile Field to a User Group? by LoopSetShop - Sun @ 10:45am Re: How to connect a Profile Field to a User Group? by perlDreamer - Sun @ 10:32am How to connect a Profile Field to a User Group? by LoopSetShop - Sun @ 09:45am Re: OReilly by koen - Sat @ 06:44pm Re: OReilly by JT - Sat @ 12:46pm Re: Glad to be here by Mike_S - Sat @ 09:11am
|