Ok, the index template has no post, so you will need to make that
conditional on post being there.

On Wed, May 13, 2020 at 6:12 AM Julien Vallet <j.surc...@wanadoo.fr> wrote:

> 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
> <https://groups.google.com/d/msgid/nikola-discuss/0d3c44d3-685d-426c-845b-13918cd9c2e7%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>

-- 
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/CALXDAfqHUKrJaSx7L2yt6gb42p-Z83CDEkZyc8RAKRXMxV-cWg%40mail.gmail.com.

Reply via email to