It has three posts and it's the index template. Le mercredi 13 mai 2020 10:59:50 UTC+2, Julien Vallet a écrit : > > Hi, > > > I have trouble with the replacement of an old theme. > > When building under a new theme (canterville), I get a > > > __M_writer(str(post.meta('banner'))) > AttributeError: 'Undefined' object has no attribute 'meta' > > ######################################## > render_galleries:output/galleries/index.html <stdout>: > > > Maybe its because I misused conf.py ? > > > GLOBAL_CONTEXT = { > "BANNER_URL": '/assets/img/oeil.jpg', > > } > > > Yet I've been careful with the Global_context location... > > > Or in my template ? > > > <div class="site-wrapper"> > % if 'main_index' in pagekind: > <header class="main-header" style="background-image: url(${BANNER_URL})"> > % else: > <header class="main-header" style="background-image: > url(${post.meta('banner')})"> > % else: > <header class="main-header post-head no-cover"> > % endif > > > Can you help me ? >
-- You received this message because you are subscribed to the Google Groups "nikola-discuss" group. To unsubscribe from this group and stop receiving emails from it, send an email to nikola-discuss+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/nikola-discuss/0d3c44d3-685d-426c-845b-13918cd9c2e7%40googlegroups.com.