You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi,
Although I've set 'paginatedSections' parameter in config.toml to have content from two different sections on the index page but it seems the check to see if 'paginatedSections' is set or not doesn't work and the 'else' get's executed which falls back to rendering contents in 'post' section only.
Here's how I've set the paginatedSections:
I've tried to fix it myself but had no luck in doing so. Just trying to figure out what's wrong, I tried to see if if isset .Site.Params "paginatedSections" is really working, changing 'paginatedSections' to some other variable like 'description' works as intended.
I couldn't figure out why other variables can be checked if they're set or not, but not 'paginatedSections'.
Any help would be appreciated.
Here's the code that causes the problem.
{{ if isset .Site.Params "paginatedSections" }}
{{ $.Scratch.Set "paginatedSections" .Site.Params.paginatedSections }}
{{ else }}
Here we are ! <!-- Just to check if 'else' gets executed -->.
{{ $.Scratch.Set "paginatedSections" "post" }}
{{ end }}```
The text was updated successfully, but these errors were encountered:
Hi,
Although I've set 'paginatedSections' parameter in config.toml to have content from two different sections on the index page but it seems the check to see if 'paginatedSections' is set or not doesn't work and the 'else' get's executed which falls back to rendering contents in 'post' section only.
Here's how I've set the paginatedSections:
I've tried to fix it myself but had no luck in doing so. Just trying to figure out what's wrong, I tried to see if
if isset .Site.Params "paginatedSections"
is really working, changing 'paginatedSections' to some other variable like 'description' works as intended.I couldn't figure out why other variables can be checked if they're set or not, but not 'paginatedSections'.
Any help would be appreciated.
Here's the code that causes the problem.
The text was updated successfully, but these errors were encountered: