Re: Poor mans Scarab-views are easy to achieve ...

Johannes Höchstädter <[email protected]> Wed, 23 Sep 2009 12:30:38 +0200
Newsgroups gmane.comp.java.scarab.devel
Message-ID <[email protected]>
Hi,

for me overwriting an already existing template, by copying it into the=20
folder for extensions is already possible. What was/is the main goal here?

cheers

Hussayn Dabbous schrieb:
> Hi;
>
> i found 34 calls to renderer within the entire Scarab template directory=
=20
> structure.
> I have the idea to encapsulate the call into a macro:
>
> #macro (render $path $template)
>     $renderer.render( $path, $template)
> #end
>
> and refer to that macro instead of the direct call to the renderer.
>
> Then i can put some logic into the macro, which examines the PathInfo for
> the occurance of /view/<myview> and if the parameter is found:
>
> check if the template /views/$view/$path/$template exists.
>
> If the template exist:
>
> $renderer.render( /views/$view/$path, $template)
>
> else
>
> $renderer.render( $path, $template )
>
> Then i can drop a modified stripped down copy of the templates into my
> userextensions section and i have views. Of course it would be nice to
> be able to control views in a more elaborate way, but that could be
> added later, if the concept itself proofs reliable and usefull.
>
> Any complains about implementing the initial organisational change of=20
> adding the
> #render macro to the templates ? It would not change any functionality=20
> of Scarab.
>
> ------------------------------------------------------
> http://scarab.tigris.org/ds/viewMessage.do?dsForumId=3D455&dsMessageId=3D=
2360847
>
> To unsubscribe from this discussion, e-mail: [[email protected]=
is.org].
>
>  =20

--=20

Johannes H=C3=B6chst=C3=A4dter

memoComp Software Engineering & Consulting
Frank Freund
Michelsberg 28
65183 Wiesbaden
Germany
Fon +49 (0)611 9320054
Fax +49 (0)611 9320059
Amtsgericht Wiesbaden HRA 4304

------------------------------------------------------
http://scarab.tigris.org/ds/viewMessage.do?dsForumId=3D455&dsMessageId=3D23=
98813

To unsubscribe from this discussion, e-mail: [[email protected]=
.org].