Click here to register.
      
Sprechen Sie WebGUI? Parlez vous WebGUI? Se habla WebGUI? Spreekt u WebGUI?

Do you speak WebGUI? Please help us translate WebGUI into your language.



     Extending the RandomAssetProxy by a templateID argument > Re: Extending the RandomAssetProxy by a templateID argument

Extending the RandomAssetProxy by a templateID argument

User bernd
Date 5/1/2008 3:01 pm
Views 965
Rating 0    Rate [
|
]
Previous · Next
User Message
bernd

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
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
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
> 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 [
|
]
 
 

Recent Discussions Color Key

Design:

Development:

Et Cetera:

Install/Upgrade:  

Smoketest:

Template Group:


Re: Site paid for by advertizing by Klaus - Fri @ 02:27am

Smoke Test for WebGUI (Stable) (2008-11-21) by botaction - Fri @ 12:37am

Re: Site paid for by advertizing by pwrightson - Thu @ 10:59am

Re: Site paid for by advertizing by JT - Thu @ 08:58am

Re: Regelmäßiger Termin für Usertreffen in der Rhein-Neckar-Region by Klaus - Thu @ 06:11am

Smoke Test for WebGUI (Stable) (2008-11-20) by botaction - Thu @ 12:00am

Smoke Test for SVN (2008-11-20) by botaction - Thu @ 12:00am

Re: Improving page layouts by fdillon - Wed @ 08:38pm

Re: Improving page layouts by knowmad - Wed @ 08:25pm

Re: Site paid for by advertizing by knowmad - Wed @ 08:07pm

Re: SSL Configuration? by knowmad - Wed @ 07:51pm

Re: The Death of the Collaboration System by preaction - Wed @ 07:39pm