Git – Full site editor, hard-coded IDs in query blocks, and staging/dev servers


I am using Full Site Editor for a new site. This site has several query blocks that show specific categories. The query hard-codes the IDs of these categories into the template HTML file. I am then using git to sync between the dev, staging and production servers.

The problem is that the category and navigation ids are different on the server, so I have to manually set the category id for each server, breaking my git workflow.

I don’t want to replicate the database on the server for several reasons. Using the category slug would solve this problem, but it doesn’t seem to be an option.


  • I explored using function hooks to transform the query, but it looks like you can only modify the output of a full site editor query block, not change the underlying query.
  • I could create a custom query block, but then I would have to maintain it, which I would prefer not to do.
  • Git (GitHub verb?) to change ID in HTML template

Is there a recommended way to deal with this situation?

Leave a Comment