Sorry I didn't include that in my original message, but I did try that
before.... it didn't work.   Would this have been something that was
fixed in a later version of Mason?   I'm running v1.34.

I also tried Tim's suggestion of adding the slash after the </%init> in
addition to the <% $link %>, but that didn't work either.

I suppose I could try rewriting it in a completely different way, but I
shouldn't have to, should I?  Given in inline nature of this component
call and the way I'm using it, I really believe it should not add a
newline.  It would be easier for the user to add one if desired.

Robert


On Nov 30, 2007, at 3:28 AM, Jonathan Swartz wrote:

> In cases like this it's appropriate to just print and return
> inside the init:
>
> <%init>
> my $link = $m->scomp('../mason/popup.mas',
>            text => $m->content, [..other args..] );
> print $link;
> return;
> </%init>
> 


On Nov 29, 2007, at 5:53 PM, Murray, Robert wrote:

> Greetings,
>
> OK, I read the thread on newlines before component results, and  
> placing
> a slash after the <%def> tag works great for that (shown in my example
> below).
>
> However, my problem is I want to remove the one AFTER the results.   
> This
> is an issue because there is often be punctuation following a link  
> (like
> the period and comma in my example below), and having a space between
> the link and that char looks bad.
>
> In my example, I have a component that generates a large javascript  
> call
> string for an onclick event, in a number of places on the page.
> Naturally, I use the inline component call <&|>..</&> to eliminate the
> code redundancy there, not to mention I have a generic component to
> generate js popup code.
>
>
> <html>
> ...
> With <&| .reglink &>product registration</&>, ...blah blah...
> ...
> Register <&| .reglink &>here</&>.
> ...
> </html>
>
> <%def .reglink>\
> <%init>
> my $link = $m->scomp('../mason/popup.mas',
>            text => $m->content, [..other args..] );
> </%init>
> <% $link %>
> </%def>
>
>
> I've tried several things, including:
>   </%def>\
> ..and:
>   <% $link %>\
> ..and a couple other things that didn't work.
>
> Is there a way to remove the training newline when using an inline
> component call with content in this way?
>
> Thanks,
> Robert
>


-------------------------------------------------------------------------
SF.Net email is sponsored by: The Future of Linux Business White Paper
from Novell.  From the desktop to the data center, Linux is going
mainstream.  Let it simplify your IT future.
http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4
_______________________________________________
Mason-users mailing list
Mason-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mason-users

Reply via email to