On Thu, 29 Nov 2007, 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?

Try this:

<%def .reglink>\
<%init>
my $link = $m->scomp('../mason/popup.mas',
           text => $m->content, [..other args..] );
</%init>\
<% $link %>\
</%def>

        Untested.


---------------------------------------------------------------------
| Name: Tim Nelson                 | Because the Creator is,        |
| E-mail: [EMAIL PROTECTED] | I am                           |
---------------------------------------------------------------------

----BEGIN GEEK CODE BLOCK----
Version 3.12
GCS d+++ s+: a- C++$ U+++$ P+++$ L+++ E- W+ N+ w--- V- 
PE(+) Y+>++ PGP->+++ R(+) !tv b++ DI++++ D G+ e++>++++ h! y-
-----END GEEK CODE BLOCK-----

-------------------------------------------------------------------------
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