Bookshelve

These bookshelves are generated using different techniques. Below you see the results and at the end of the page the code to make this happen.

[[module childpages]] - list

Only works if you set a parent… so this list does not show the books that have no parent.

[[module listpages]] - simple list

[[module listpages]] - complexer list

title Author Genre Tags
Test Thomasr educational
Harry Potter J.K. Rowling novel _hide
Das Kapital Karel Marx educational _hide
Through the Looking-Glass Lewis Carroll novel _hide
The Invisible Book The invisible man thriller _hide
Guinessbook of records World's best writer novel _hide
Lord of the rings JRR Tolkin novel _hide
Alice In Wonderland Lewis Carroll thriller fiction _hide

Always add a space inside each cell in case there is no value, the cell will contain a space then and not collapse.

[[module listpages]] - EVEN MORE complex list: toggle view of item

There was a time that it was not allowed to read all the books you wanted to read so you had to hide your books from public lists… I've added a buttom that enables you to remove something from a list but not delete it. It is done by tagging that page with the tag _hide. As long as the bookpage has that tag… it will not be visible in this list

Test Thomasr educational

hide

The code

@@[[module childpages]]@@ - list
[[module childpages]]

@@[[module listpages]]@@ - simple list
[[module listpages category="book" separate="false"]]
* %%title_linked%%
[[/module]]

+++ @@[[module listpages]]@@ - complexer list
[[module listpages category="book" separate="false" 
prependLine="||~ title||~ Author||~ Genre||~ Tags||"]]
||%%title_linked%% ||%%form_data{author}%% ||%%form_data{genre}%% ||%%tags%% %%_tags%%||
[[/module]]

@@[[module listpages]]@@ - EVEN MORE complex list: toggle view of item
[[module listpages category="book" separate="false" 
prependLine="[[table]]" appendLine="[[/table]]" tags="-_hide"]]
[[row]]
[[cell]]
%%title_linked%%
[[/cell]]
[[cell]]
%%form_data{author}%%
[[/cell]]
[[cell]]
%%form_data{genre}%%
[[/cell]]
[[cell]]
[ [include :csi:hidepage 
hidepage=%%fullname%%|
thispage=bookshelve|
site=%%site_name%%|
button=hide] ]
[[/cell]]
[[/row]]
[[/module]]

Be aware of the fact that I had to put a space between the 
brackets of the Include...otherwise it is replaced by the code 
it will include... so if you want to use that code, remove the 
space between the brackets [ [ ==> [[.
Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License