latest 17 messages by Guest31059

+ [2014-07-24T08:57:26Z] Guest31059 Did anyone already run into a similar problem?
+ [2014-07-24T08:57:09Z] Guest31059 I've also tried to use the `| plus: 0` filter on number_of_chapters, but it doesn't fix the problem either
+ [2014-07-24T08:55:28Z] Guest31059 I've tried to use the to_number filter on number_of_chapters, but it doesn't fix the problem
+ [2014-07-24T08:54:50Z] Guest31059 However, this doesn't work, as page.chapter_number is a number, and number_of_chapters is a string (due to the capture tag), so the comparison does not work
+ [2014-07-24T08:53:48Z] Guest31059 This is not the final chapter!
+ [2014-07-24T08:53:37Z] Guest31059 {% if number_of_chapters != page.chapter_number %}
+ [2014-07-24T08:53:10Z] Guest31059 {% capture number_of_chapters %}{{ site.chapters | size }}{% endcapture %}
+ [2014-07-24T08:53:03Z] Guest31059 to do that, I have the following code in the template of my chapter files:
+ [2014-07-24T08:52:48Z] Guest31059 What I'm trying to do is to display something in the chapter files only if the chapter is not the final chapter (so if chapter_number != total number of chapters)
+ [2014-07-24T08:52:04Z] Guest31059 So I have the chapter_number in the front matter
+ [2014-07-24T08:51:53Z] Guest31059 My chapter's content
+ [2014-07-24T08:51:45Z] Guest31059 chapter_number: 1
+ [2014-07-24T08:51:34Z] Guest31059 I have a collection called chapters (so the _chapters folder), in which MD files look like this:
+ [2014-07-24T08:51:04Z] Guest31059 Hey guys, I'm having trouble with a liquid comparison, and my problem is a bit complex: