//Work with LiveSite Components “Offline”

If you are developing LiveSite components in a shared environment, the chances are high that your editing will be interrupted by other users performing builds. To get around this you can bypass the online environment, and access the component files direct.

1) Use Samba or a tool such as FileZilla to access the component files. If you are using FileZilla, set the editor to VIM.

2) Select “view/edit” in FileZilla to access each LiveSite component.

3) The component file is very difficult to read as the XSL code has amongst other things,  < and > replaced with < and >

4) To remedy the above, add the following functions and menu options to your VIM environment :-

” Make a LiveSite component more readable
func MakeComponentReadable()
%s/ /<cr/>/g
set syntax=xml

” Restore a LiveSite component back to it’s original state prior to uploading
func RestoreComponent()
%s/<cr/>/ /g
set syntax=

amenu one.Make LS Component Readable :call MakeComponentReadable()<CR><ESC>
amenu one.Restore LS Component :call RestoreComponent()<CR><ESC>

5) The first function adds readability to the component file, whilst the second is used to restore the standard component formatting once your editing is done, and you are ready to upload the component back to the LS environment.

By |2008-08-08T10:47:51+00:00August 8th, 2008|XSL|0 Comments

About the Author: