Bricks?

11 views
Skip to first unread message

serg

unread,
Jun 29, 2011, 9:08:54 AM6/29/11
to zena
Hello!
I want to extend zena with some specific features (for my site). I
tried to read official documentation, but it contains TOOMANY pages :)
Is it possible to get all zafu pages in one document or archive?
Second question - is it possible to get any simple, but functional
extension? E.g. event list, showing nearest N events with dates and
places? I think, learning-by-example can be good alternative :)

Gaspard Bucher

unread,
Jun 29, 2011, 9:32:03 AM6/29/11
to zena...@googlegroups.com
Hi Serg,

I have the feeling you are confusing "bricks" with zafu in a way. "Bricks" are extensions to Zena that are easy to reuse in different applications. These are only needed if you need something that Zena does not provide. Building bricks requires quite some knowledge of Zena's internals.

On the other side, Zafu is a templating language used to create the web pages.

For example:

> E.g. event list, showing nearest N events with dates and
places?

1. You can use the "date" properly which is already indexed.
2. Since "date" is attached to "Post" class by default, I'll use this.

<ul do='posts in site order by date desc limit 10'>
  <li do='each' do='link'/>
</ul>

The "posts in site order..." stuff is an SQLiss query (http://zenadmin.org/en/zafu/page443.html).

Gaspard


--
_______________________________________________
zena mailing list
ze...@zenadmin.org
http://zenadmin.org/en/community

Sergey Zhumatiy

unread,
Jun 30, 2011, 3:40:02 AM6/30/11
to zena...@googlegroups.com, Gaspard Bucher

> I have the feeling you are confusing "bricks" with zafu in a way.
> "Bricks" are extensions to Zena that are easy to reuse in different
> applications. These are only needed if you need something that Zena
> does not provide. Building bricks requires quite some knowledge of
> Zena's internals.
>
Actually, I need something like that :)
I want to build non-standard flexible information system. Zena have
ideal object data structure for my goals (dynamic page types and
relations, etc). I need to add some functionality, such as workflows,
custom filters, etc.
Is it possible to find a small "Zena crash-course for thoose who
knows rails"? ;)

> On the other side, Zafu is a templating language used to create the
> web pages.
>
> For example:
>
> > E.g. event list, showing nearest N events with dates and
> places?
>
> 1. You can use the "date" properly which is already indexed.
> 2. Since "date" is attached to "Post" class by default, I'll use this.
>
> <ul do='posts in site order by date desc limit 10'>
> <li do='each' do='link'/>
> </ul>
>
> The "posts in site order..." stuff is an SQLiss query
> (http://zenadmin.org/en/zafu/page443.html).
>

Good. But what if I need two independednt date fileds (conference
date and registration dedaline e.g.)? Could I do this with Zafu only?


--
С уважением
Serg.


Gaspard Bucher

unread,
Jun 30, 2011, 5:15:00 AM6/30/11
to Sergey Zhumatiy, zena...@googlegroups.com
Yes, you go to the admin interface/properties and add a new datetime "column" which you can index with ".idx_datetime2". If you need more indexed dates, you can use the key/value "datetime" index (a tad slower then .idx_datetime since the fields live in another key/value based table). And if you need to have tons of complex index values, you can use scope index (http://zenadmin.org/757).

Gaspard
 

--
 С уважением
                                                  Serg.





--

                                                               Gaspard

Reply all
Reply to author
Forward
0 new messages