Unfortunately this does not work. The error message is "Attribute Error: 'Post' object has no attribute 'slug' "
Please note that I have no posts but only pages. Do you have a recommendation for the problem? Thank you in advance. Am Mittwoch, 28. November 2018 10:00:21 UTC+1 schrieb Chris Warrick: > > On Wed, 28 Nov 2018 at 09:53, Axel Klein <[email protected] > <javascript:>> wrote: > > > > Hello Chris, > > > > Thank you for your hint! > > > > Since I'm new to Nikola, please forgive me this follow-up: > > > > How can I use the pagekind? I've set this in my base.tmpl: > > > > % if 'index' in pagekind: > > <div class="jumbotron" style="background-image: > url('images/some_pict.jpg'); background-position: 50% 25%; > background-repeat: no-repeat; background-size: cover; height: 500px;"> > > <h1 class="font-weight-bold text-center" style="color: white; > text-shadow: black 0.3em 0.3em 0.3em;">Some text!</h1> > > </div> > > %endif > > > > and in my home.rst I've added this: > > > > > > > > Unfortunately now the jumbotron is not shown on the index/home-page. > > > > Can you give me a hint, explanation? > > Sorry, pagekind does not apply in this case, I thought you were > dealing with the blog index. In this case, you can check the post > slug. > > % if post and post.slug('meta') == 'index': > > -- > Chris Warrick <https://chriswarrick.com/> > PGP: 5EAAEA16 > -- 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 [email protected]. For more options, visit https://groups.google.com/d/optout.
