Forum OpenACS Q&A: how to include bookshelf-titles-include on homepage

hi all,

I must do something wrong but I don't succeed at including the "bookshelf-titles-include" on my homepage.

when I visit I see the list of books without problem but on my homepage (index.adp) I have the code <include src="/packages/bookshelf/www/bookshelf-titles-include">

and nothing is showing (I get no error in the log).

Any idea?

What I really would like to do is to add a random book (like on I found a thread about some code in cvs (lib/Attic/random-book) but it seems it was removed.

anyone knows if it is still to be found somewhere?

thanks again.


Posted by xx xx on
You probably need to add the package_id. If you have only one instance of the bookshelf package, try:

<include src="/packages/bookshelf/www/bookshelf-titles-include" package_id=@bookshelf_package_id@>

set bookshelf_package_id [apm_package_id_from_key "bookshelf"]

Posted by xx xx on
Not sure if it is meant this way. I noticed that on the homepage the URL is incorrect.

In bookshelf-titles-include.tcl change the url to:

set view_url "/bookshelf/book-view?[export_vars { book_no }]"

or figure out where it is mounted and see what else you encounter.

Posted by Yves Goldberg on
thank you very much Aldert,

by the time I got your second message I figured it out that I had to change "view_url" in the tcl file.

and it works fine now :)

would you know where the random code is?

thanks again.


Posted by xx xx on
Glad it works, but I don't know about the random code.

I haven't used it before, but I suppose you mean:

Just got interested by your demo and (at least) one really happy kid from belgium :)