[opencms-dev] How to develop a site from cero

Claus Priisholm cpr at codedroids.com
Wed Sep 17 09:48:01 CEST 2003


Hi

I think the best way to get started at this point is to install OpenCms 
and then start looking at what's in the virtual filesystem (VFS) after 
the installation, ie. look at index.jsp, the release folder and those 
templates it uses. There is no "start here" document (or at least not 
one I know of). Theres of course always the archive of this mailing 
list along with a couple of forums which do provide more information.

One of the keys to understand OpenCms is to understand what goes where 
in the VFS. Having worked with for a month or so, I'm still discovering 
things, but I think I can provide some help anyway:

Modules seem to have three characteristics:
1) they are a convenient way of packaging various resources into a 
whole which can easily be distributed and reused (just like modules and 
plug-ins in other areas of programming).
2) They are per default protected such that only administrators can 
edit stuff inside a module thus making them ideal location of placing 
stuff that needs that kind of protection.
3) They are mandatory when you create a template, i.e. at the very 
least there must be a special XML template inside the module in order 
for you to use this template in the Explorer and WYSIWYG-editor - AFAIK 
any other files can be placed anywhere if you desire to do so (e.g. I 
have an example where I haven't stored the CSS file inside the module 
but rather placed it inside a 'hidden' directory in the root of the 
site, thus allowing projectmanagers and others to actually make changes 
to it without having to have access to the module directory).

A project is a kind of a sandbox you set up. When you define a project 
you list the directories that belong to that project, e.g. if you have 
a part of a site that relates to the organization and you have to 
update that part of the site (an exercise that seems to be quite 
frequent i large companies :-), then you'll define the project such 
that it deals with the "/organization" folder. Now when choosing to 
work in that particular project you cannot access files outside that 
directory. So it safeguards the rest of the site. And once you're done 
with the update, you can publish all changes withing the project in one 
go. Also, projects plays a central role when using the workflow-view.

So you may create a module, then define a project with that module 
folder and do all the work inside that project. Other than that there 
is not really any relationship between modules and projects. Note that 
even if you do not make new projects you're still inside a project when 
you make changes, the special Offline project.

JSP and XML templates: prior to version 5 XML templates was the only 
choice (I assume that there is a schema for them somewhere(, but now it 
is recommended to use the JSP template. I assume the XML template stuff 
will become deprecated over time, at least I've followed recommendation 
in the documentation, so I've only looked into the JSP side of things.

You can make pure HTML pages, but the point to OpenCms is that you want 
to make a couple of JSP templates and use those when you create the 
documents. In that case most of the documents the users will be editing 
are 'pure' HTML, but judging from my own limited experience and from 
looking at various examples I've found, it seems likely that you' have 
a few JSPs throughout a site, doing specialized pages that cannot be 
handled by the standard 'one body' template mechanism. An alternative 
may be what's referred to as "content definitions", i.e. putting more 
structure into the documents - there are a few examples such as news 
module and so on that uses this approach - haven't tried that so I 
can't comment on it

On tirsdag, sep 16, 2003, at 20:50 Europe/Copenhagen, 
jbellina at fys.com.ar wrote:

>
> Hi, I have found during my evaluation to opencms that the 
> documentation does not show instructions abount how to build a site 
> from cero.
> Here are some doubts after reading the documentation of the opencms.org
>
> Where I have to put the pages I create (in a folder or inside the 
> module in which I am developing).
> What is the relationship between a module and a proyect?
> What are the diferences between jsp and xml templates?
> Is it necesary to make jsp pages or I can build only html pages
>
> As you can see I am not so involved in JSP,  JAVA,  XSL,  etc.
> Can anybody send me a set of instructions, suggestions or examples of 
> how I can make a site of four simples pages?
> Did I miss something in the documentation?
--
Claus Priisholm
+45 48 22 46 46, fax: +45 48 22 46 43
cpr at codedroids.com
http://www.codedroids.com

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: text/enriched
Size: 4636 bytes
Desc: not available
URL: <https://webmail.opencms.org/pipermail/opencms-dev/attachments/20030917/e0633dc2/attachment.bin>


More information about the opencms-dev mailing list