PlaidWeb / Publ

Flexible publishing system for the web
http://publ.beesbuzz.biz/
MIT License
40 stars 4 forks source link

Refining a view spec doesn't allow overriding count #528

Closed fluffy-critter closed 1 year ago

fluffy-critter commented 1 year ago

Expected Behavior

{% set view=view(count=50) %}
{% set view=view(count=25) %}

should result in a value of view whose count is 25

Current Behavior

result is a view whose count is 50

Context

fluffy-critter commented 1 year ago

Hm, the problem actually seems to be something weird with how the jinja set primitive works in some contexts

fluffy-critter commented 1 year ago

The problem is actually in the order of operations of globals vs. extends in Jinja templates; turns out that the local set values get evaluated before the extends logic takes place.