Is Custom Code global or individual for pages?

Hi, I found Softr gives each block as unique names based on pages. That means the first table block created in different pages are all called table1 by default. Meanwhile, Custom Code is applied to the blocks based on the block names in the code.

So is Custom Code global or individual for pages? In my project, all pages share the same code in Custom Code input field, but what if different pages have the blocks with the same name? Will the code with this block name be applied to all these blocks?

Anyone can answer this question?

Hi @Rexxx,

There is a custom code section in both the page settings and app settings. If the code has been added from Page Settings > Custom Code, it will affect only the blocks on that specific page. If the code has been added from App Settings > Custom Code, it will apply to all blocks with the same ID across all pages.

I hope this answers your question.

1 Like