It's great!

Thank you very much Monk!

I made it up by [(search group={p2}* template="{+title}")], but your
suggestion is far better.

The second problem on my way is: Is it possible to use conditional
statement in template?

Example:
/*
[[#catalog]]
[(template first)]
!! Content:
[(template each)]
[if exists library.{+p2}.1]
* [[{+p}|{+title}]]
[else]
[[library.{+p2}|library.{+p2}:{+title}]]
[if]
[(template last)]
[[#end]]
*/

Thanks in advance,

Bogdan

On 12 Дек, 18:07, DrunkenMonk <[email protected]> wrote:
> If you are going to make a lot of these kind of structures, I strongly
> recommend installing the database plugin.
>
> The logic and code required become quite a bit simpler.
> Theres nothing wrong with going pure boltwire, but a few select
> statements are, in my experience, easier to handle.
>
> On Dec 12, 12:29 pm, Bogdan <[email protected]> wrote:
>
>
>
> > Thanks Dan,
>
> > I decided to try the option to use one group for storing data:
> > shelf.chapters.book_name.chapter_number for book chapter and
> > shelf.books.book_name - for basic data of the book and TOC; and
> > action.book.missing to display the content with conditional statement
> > for the various cases.
>
> > I stuck at the following problem: I take the book_name from the {p2}
> > variable and I need to display its title in the chapter header.
> > Unfortunately {p2:title} doesn't work. I tried to use info variable:
> > book: {p1}.{p2}; and then: {::book:title} but it's not working either.
>
> > Thank you for the support,
>
> > Bogdan
>
> > On 11 Дек, 13:08, The Editor <[email protected]> wrote:
>
> > > On Fri, Dec 11, 2009 at 2:43 AM, Bogdan <[email protected]> wrote:
> > > > Hi friends,
>
> > > > I have the following problem: I'd like to add library of books in my
> > > > site with the following structure: library.book_name1.chapter1,
> > > > library.book_name1.chapter2, ..., library.book_name2.chapter1,
> > > > library.book_name2.chapter2,...
> > > > where the books (library.*, the p2-level) have their own structure
> > > > (mainly the book title and TOC): style, skin and action.book.create,
> > > > action.book.edit (i.e. custom set of fields and design); and also the
> > > > chapters (library.book.*, the p3-level) have specific design: skin,
> > > > style, create/edit.
>
> > > > The question is: how to make design and structure for pages of
> > > > different levels?
>
> > > You can't do this directly, but see below...
>
> > > > ***************************************************************************
> > > >  **
> > > > One possible solution is rearrange the site structure:
> > > > library.books.bookname1, library.books.bookname2,... with design and
> > > > actions for library.books* for the book title and TOC; and
> > > > library.chapters.bookname1.chapter1,
> > > > library.chapters.bookname1.chapter2, ... with design and actions for
> > > > library.chapters*. The problem here is the linking to book and
> > > > chapter:  They don't flow naturally: library.bookname.chapter.
>
> > > This would be my first suggestion...  It gives you the functional
> > > control for any part of your site...
>
> > > > Is there a way to make page niknames for long names, i.e. to make the
> > > > non-existing page library.bookname1.chapter2 to reference to
> > > > library.chapters.bookname1.chapter2; and library.bookname1 to link to
> > > > library.books.bookname1?
>
> > > Yes, this would be my second suggestion. Create a page called
> > > action.library.chapters.missing and then when you go to
> > > library.chapters.bookname1.chapter2 you will get the content of that
> > > page. You can use {p3} and {p4} in that page to access the reference
> > > you are looking for.
>
> > > > Another possible solution is to make library database at
> > > > library.books* and library.chapters* to store the content, and to use
> > > > library.bookname1 to retrieve the information from library.books.book1
> > > > and library.bookname1.chapter2 to retrieve the information from
> > > > library.chapters.bookname1.chapter2 by search-function. But I hope the
> > > > system has some option for easier solution of this problem.
>
> > > A database plugin was recently developed by DrunkenMonk. 
> > > Seehttp://www.boltwire.com/index.php?p=solutions.system.mysql
>
> > > > I would be really grateful for your help in this issue.
>
> > > Another option is to use conditionals in headers and footers. [if
> > > equal {p4} chapters]show this content... [if][if equal {p4}
> > > bookname]show something different[if], etc...
>
> > > Cheers,
> > > Dan

--

You received this message because you are subscribed to the Google Groups 
"BoltWire" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/boltwire?hl=en.


Reply via email to