Sorry, copy and paste error. I meant to say 'augment', which is the standard
way to do wrapping.
<%augment wrap>
<html>
<% inner %>
</html>
</%augment>
<%class>
method render {
$.wrap(); # do wrapping
}
</%class>
On Jul 25, 2011, at 11:38 PM, Matthias Dietrich wrote:
> Hi Jon,
>
> I'm not able to send something to you now, may do later. First different I'm
> seeing here is that I haven't used '<%around wrap>'. I thought this wouldn't
> be needed. AFAIK at least within components it worked without this, but I
> take a look later when I'm in the office.
>
> Thanks,
> Matthias
>
> --
>
> Sent from my iPhone so expect spelling errors and stuff.
>
> rainboxx Matthias Dietrich
> Freelance Software Engineer
>
> rainboxx
> Königsallee 43
> 71638 Ludwigsburg
> +4915150607864
>
> Vist: http://www.rainboxx.de
>
> Am 26.07.2011 um 00:48 schrieb Jonathan Swartz <[email protected]>:
>
>> Sorry, this seems to work for me. I have a Base.mc:
>>
>> <%around wrap>
>> <html>
>> <% inner %>
>> </html>
>> </%around>
>>
>> <%class>
>> method render {
>> $.wrap(); # do wrapping
>> }
>> </%class>
>>
>> and a foo.mc:
>>
>> Foo
>>
>> and when I request /Foo, I get
>>
>> <html>
>> Foo
>> </html>
>>
>> as expected.
>>
>> Can you forward me a minimal but complete set of components that illustrate
>> your problem?
>>
>> Jon
>>
>> On Jul 24, 2011, at 1:25 PM, Matthias Dietrich wrote:
>>
>>> Hi Jon,
>>>
>>> when I use the following code snippet within the upper-most Base.mc,
>>> $.wrap() seems to call the template directly instead of going through the
>>> rest of Base.mc and calling the template there through inner(). Is this
>>> intended? If yes, is there a possibility to skip rendering Base.mc only
>>> when certain conditions are true?
>>>
>>> Best,
>>> Matthias
>>>
>>>
>>>
>>> Code Snippet, used within Catalyst:
>>>
>>> <%class>
>>> method render {
>>> if ($c->req->is_xhr) {
>>> $.main(); # skip wrapping
>>> } else {
>>> $.wrap(); # do wrapping
>>> }
>>> }
>>> </%class>
>>>
>>>
>>> --
>>> rainboxx Software Engineering
>>> Matthias Dietrich
>>>
>>> rainboxx Matthias Dietrich | Phone: +49 7141 / 2 39 14 71
>>> Königsallee 43 | Fax : +49 3222 / 1 47 63 00
>>> 71638 Ludwigsburg | Mobil: +49 151 / 50 60 78 64
>>> | WWW : http://www.rainboxx.de
>>>
>>> CPAN: http://search.cpan.org/~mdietrich/
>>> XING: https://www.xing.com/profile/Matthias_Dietrich18
>>> GULP: http://www.gulp.de/profil/rainboxx.html
>>>
>>>
>>>
>>>
>>> ------------------------------------------------------------------------------
>>> Magic Quadrant for Content-Aware Data Loss Prevention
>>> Research study explores the data loss prevention market. Includes in-depth
>>> analysis on the changes within the DLP market, and the criteria used to
>>> evaluate the strengths and weaknesses of these DLP solutions.
>>> http://www.accelacomm.com/jaw/sfnl/114/51385063/
>>> _______________________________________________
>>> Mason-users mailing list
>>> [email protected]
>>> https://lists.sourceforge.net/lists/listinfo/mason-users
>>
------------------------------------------------------------------------------
Magic Quadrant for Content-Aware Data Loss Prevention
Research study explores the data loss prevention market. Includes in-depth
analysis on the changes within the DLP market, and the criteria used to
evaluate the strengths and weaknesses of these DLP solutions.
http://www.accelacomm.com/jaw/sfnl/114/51385063/
_______________________________________________
Mason-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mason-users