From: Jonathan S. <sw...@po...> - 2007-11-30 11:29:07
|
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 > Mas...@li... > https://lists.sourceforge.net/lists/listinfo/mason-users > |