|
Re: _extends & _prototype: msg#00001java.helma.general
Jonathan Puckey schrieb: > Ack.. This isn't working in the way I wanted it to after all.. > When I restart my app and point to /Exhibitions/archive/2005/this-is- > the-title/, it uses the Page prototype and not the ArchivePage > prototype.. > And then sometimes it does use the right one.. Flakey at best! > > So I need a different approach, I guess.. > yes, using the inheritance-mechanism doesnt help you at all in your situation, since you are dealing with the same object. no matter how you access it via your URL. > What would be the best way to have the main.hac that is fired be > dependent on the collection that it resides in? > lets assume 'archive' is a Prototype named 'ArchiveMgr'. Then you could do the following: function main_action() { if (path.ArchiveMgr) { ... // we accessed the Page via the archive } else { ... // we accessed the Page directly } } hth, michi
|
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | convert image to grayscale, Jonathan Puckey |
|---|---|
| Next by Date: | Re: _extends & _prototype, Jonathan Puckey |
| Previous by Thread: | convert image to grayscale, Jonathan Puckey |
| Next by Thread: | Re: _extends & _prototype, Jonathan Puckey |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |