Version française
Home     About     Download     Resources     Contact us    
Browse thread
Help with Elliom syntax
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Sylvain Le Gall <sylvain@l...>
Subject: Re: Help with Elliom syntax
Hello,

On 04-11-2010, Till Crueger <Till.Crueger@gmx.net> wrote:
> Hi,
>
> I am still trying to find my way with Elliom and Ocsigen. Right now I can  
> use OCaml to generate the pages I want, but I still have problems to  
> figure out how to encode the XHTML. The main question I have is how to  
> assign attributes to elements,
> like div blocks or others. I found the a_id functions that should return  
> an id object, but I have not figured out how to use it to actually assign  
> the id.
>

Most of the time you have an ~a parameter.

Example:
div ~a:[a_class ["statistics"]] [ h2 [pcdata "Statistics"]; ... ]

Regards,
Sylvain Le Gall