Custom base template

34 views
Skip to first unread message

Martijn vdv

unread,
Sep 16, 2015, 6:08:15 AM9/16/15
to Waliki
Is there a way to change the - rather standard - layout of the wiki?

I know there's something with boxes, but it looks like we need to make custom url routing rules (e.g catch view vs. edit) and re-implement templates for multiple pages. I just want to edit the base template.

Can someone point me into the right direction here?

Martín Gaitán

unread,
Sep 16, 2015, 9:23:20 AM9/16/15
to Martijn vdv, Waliki
Hey Martijn, 

sure, waliki tries to be very customizable. it uses standard django templates with a simple inheritance tree. 
Its something like this

base.html <- site_base.html <-  waliki/base.html <- waliki/detail.html  <-  waliki/edit.html  
                                               
(As a rule of thumb, every other template for a page inherits from waliki/detail.html)

you can browse them here 


So, you can override any of them, . For example, Python Argentina's site (www.python.org.ar), has it own waliki/detail.html



In addition, there is a concept of "entry points" in waliki's templates. This allow plugins to "add content" (for example in the page footer) without override the whole template. 
As the whole plugin API is very clunky this could be changed in the future, but for now could be helpful . 

Here is some docs about this feature.- 



cheers
martin. 




--
You received this message because you are subscribed to the Google Groups "Waliki" group.
To unsubscribe from this group and stop receiving emails from it, send an email to waliki-devs...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Reply all
Reply to author
Forward
0 new messages