posativ / acrylamid

(unmaintained) static blog generator in python with incremental rendering ⛺
http://posativ.org/acrylamid/
Other
277 stars 40 forks source link

support translations on entry.type="page" #185

Open gustabot42 opened 10 years ago

gustabot42 commented 10 years ago

entry.type="page" are not listed in translation views, there is no way to manage translated page with the same logic of "entry"s, with respect to language menu in templates

gustabot42 commented 10 years ago

a deviation is to use a filter in the views definition, with special tag for pages.

'/:slug/': {'view': 'entry', 'if': lambda e: 'page' in e.tags}, '/:year/:slug/': {'views': ['entry', 'draft'], 'if': lambda e: 'page' not in e.tags},