eeditiones / tei-publisher-app

The main TEI Publisher app
https://teipublisher.com
GNU General Public License v3.0
68 stars 33 forks source link

Request parameters not available in templates #218

Open raphael-m opened 8 months ago

raphael-m commented 8 months ago

I have a template containing the following element (some attributes and child nodes left out to keep it simple):

<pb-table-grid source="api/locality/${key}" ... data-template="pages:parse-params">                        
    ...
</pb-table-grid>

If I understand it correctly, ${key} should be replaced with the key request parameter defined in our custom-api.json. But it seems key in the model passed to pages:parse-params is always empty.

I could narrow down the issue to be caused by this change: https://github.com/eeditiones/tei-publisher-app/commit/e76aa6df4dda8bad6c55b5d2295205800f832a92. If I uncomment the corresponding line, ${key} is populated correctly.

What was the reason for that change - is it save to uncomment the line again, or is there another solution?