autooutput replacement / equivalent?

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

autooutput replacement / equivalent?

Steve Upton

I'm hoping there's something that will put me out of my misery.

In our L8 site design I could build pages by calling tags like:

        global_header();
        section_header('mysection)

                <html page content goes here>

        global_footer();

When each tag spilled its guts using auto complete it quickly and easily built pages. I could do includes within the tags for other files, etc. At each level I could switch between "raw" HTML output and LassoScript depending on whether the work was mostly HTML or mostly Lasso logic.

Without autocomplete it seems I now have to pack everything into a string that gets returned. If I 'include' another file within the tag then it gets rather complicated. It looks like I'll have to turn them into tags, etc.

Am I missing something? L9 has code chunks used in new ways to me. Is there an easier way of including raw HTML or such? I guess that sometimes, I'd like to include files together prior to Lasso processing, if you know what I mean.

Regards,

Steve


#############################################################
This message is sent to you because you are subscribed to
  the mailing list Lasso
[hidden email]
To unsubscribe, E-mail to: <[hidden email]>
Send administrative queries to  <[hidden email]>
Reply | Threaded
Open this post in threaded view
|

Re: autooutput replacement / equivalent?

Ke Carlton-3
You can still use auto-collect with Lasso 9 syntax — it's just that the
-autocollect flag isn't recognised with older syntax. This may be a bug or
a design decision, your best bet is to contact support directly. For
example you can do this:

define global_header => {^
    'x'
    'y'
^}


And xy will be outputted where ever global_header is.

But honestly, you have better control and performance if you go down the
#out->append route:

define global_header => {
   local(out='')
   #out += 'x'
   #out += 'y'
   return #out
}


Ke

On 9 June 2012 00:14, Steve Upton <[hidden email]> wrote:

>
> I'm hoping there's something that will put me out of my misery.
>
> In our L8 site design I could build pages by calling tags like:
>
>        global_header();
>        section_header('mysection)
>
>                <html page content goes here>
>
>        global_footer();
>
> When each tag spilled its guts using auto complete it quickly and easily
> built pages. I could do includes within the tags for other files, etc. At
> each level I could switch between "raw" HTML output and LassoScript
> depending on whether the work was mostly HTML or mostly Lasso logic.
>
> Without autocomplete it seems I now have to pack everything into a string
> that gets returned. If I 'include' another file within the tag then it gets
> rather complicated. It looks like I'll have to turn them into tags, etc.
>
> Am I missing something? L9 has code chunks used in new ways to me. Is
> there an easier way of including raw HTML or such? I guess that sometimes,
> I'd like to include files together prior to Lasso processing, if you know
> what I mean.
>
> Regards,
>
> Steve
>
>
> #############################################################
> This message is sent to you because you are subscribed to
>  the mailing list Lasso
> [hidden email]
> To unsubscribe, E-mail to: <[hidden email]>
> Send administrative queries to  <[hidden email]>
>
#############################################################
This message is sent to you because you are subscribed to
  the mailing list Lasso
[hidden email]
To unsubscribe, E-mail to: <[hidden email]>
Send administrative queries to  <[hidden email]>