Software development, photography, jokes, ....

Sites by me

 
tas-logoTransportation Administration System
snoezelkussen-logo-kleinstSnoezelkussens voor verstandelijk gehandicapten
ikzoekeenbegeleider-logoBegeleiders voor gehandicapten
Laat uw hond het jaarlijkse vuurwerk overwinnen
Betuweroute en Kunst
logo 50x50Hey Vos! Je eigen naam@vos.net emailadres?
Kunst in huis? Nicole Karrèr maakt echt bijzonder mooie dingen
nettylogo2Kunst in huis? Netty Franssen maakt ook bijzonder mooie dingen
Professionele opvang bij Gastouderbureau
Kind-Zijn
Salarisadministratie en belastingadvies bij
De Zaak Loont
Zutphense Bomenstichting

Hosting Favorites

 
ANU Internet Services
XelMedia .internet Services
register.com

Blogroll

 
Bomenstichting
LassoSoft
MacFreak
Quality that computes
The Economy of Motion
Wheel 2.0
IntrAktv



Website Hosting bij Xel Media

Marc's Place


 

 RapidWeaver and Lasso Pro

  How to code in Lasso and use RapidWeaver as a framework


Here is my way how I setup a RapidWeaver Site and use it as a framework and continue using Coda for coding in Lasso.

The Reason

In the beginning I started creating all HTML-pages in RapidWeaver and name them index.lasso, so I could code Lasso directly inside the page. But as the site grows, it gets more difficult to maintain this way and needs more and more control qua coding. RapidWeaver just lacks the bare needs of an IDE. It is, of course, not really meant for hand-coders, like I am.

Somewhere half-way the development of a new site, I had Lasso code in the main page and in the Header-tab; CSS in the CSS-tab, Javascript in the Javascript-tab and Lasso code in the Prefix-tab. Very much spaghetti in my head, because I cannot view all this code in one editor, because these tabs are in the Page Inspector-window, which gets hidden when you switch to another program, like a browser to preview your page. Furthermore, there is no syntax highlighting in RapidWeaver, which makes it even harder to read large blocks of mixed code, like HTML, Javascript and Lasso.

So, the solution I came up with is this: Lasso-includes. Ah, I hear you think, yes, of course!

The Setup

Create a basic page in RW, disable it completely and add include statements in all possible code places:

Main page: 

Main Page

Page Inspector: General

Page Inspector - General

Page Inspector: Sidebar

Page Inspector - Sidebar

Page Inspector: Header

Page Inspector - Header.Header

Page Inspector - Header.CSS

Page Inspector - Header.JavaScript

Page Inspector - Header.Prefix

Now, every time you create a new page in RW, do this by duplicating this default, disabled page. After duplicating and enabling the RW-page, do not forget to set the folder name for the new page in the Page Inspector before you export the page:

Set Folder Name

When the RW-page is ready for exporting, export it to the site folder. Inside the newly generated folder for the RW-page, create a new folder called includes and create all the six files inside that folder:

i_index.lasso
i_sidebar.lasso
i_header.lasso
i_css.lasso
i_javascript.lasso
i_prefix.lasso


Example of the six includes

To ease this process, I created a default folder above the site folder, which contains all these six files, with default login-processing code already in place. When I then export a page from RW, I just have to copy this default folder inside the folder of the exported page.

Default Lasso includes folder

This of course means that you can never publish your site from within RapidWeaver, without uploading all supporting pages and files first via some FTP-program like Transmit... Therefore, the best thing to do, is to always only export pages and use Coda or your other IDE, to upload everything to your server.

The advantage of this setup is that you never need to export such pages from RW again, only when you add/delete pages because then the menu changes, or when you change something in the theme-files inside the theme’s contents:

Get to the theme's contents

Secondly, you do not have to have RW open all the time anymore, because Lasso takes care of including your files, not RapidWeaver. Thirdly, you can create a site in Coda and code away as usual!

Oh, one more thing! Very, very, very important!!
In RW’s preferences, switch When Exporting, Delete current folder off!!

Switch Delete current folder off

Otherwise, your includes folder will be deleted when you need to export the page again, for whatever reason, and all your hours of coding are lost..... make backups, use SVN or GIT, etc.


Happy coding!

© 1997- Marc Vos (and others) Contact Me