Is it possible to get the value of Paginate inside a template?


I wanted to do some math based on the paginate value set in config.toml. Is it possible to get that value without hardcoding it or introducing another parameter in [params]?

You can use the .PageSize variable.

But, I guess, it can be used only when I’m using Pagination. Sorry to not mention before, but, I am not using pagination, I just want to get the value that’s set in config.toml.

nope. only params in the [params] section are sent through to the layout files.

Thanks for the clarification. I had guessed it won’t be possible, but, needed a confirmation.

Every now and then I read about the term “namespace”, but I think that too is just a collection of parameters below the params section. It would be nice to have a feature that allows theme authors to add namespaces that are parallel to params and be loaded then as .Namespacename.parametername, but let’s not get any new ideas into the development before the existing ones are implemented :wink:

1 Like

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.