Is it possible to inject elements into a custom html index?

Hello everyone !

i’m a new python dash user, on jupyterlab, and after some weeks of self-learning,
i’m facing a problem on which i can’t found answers on internet :

I’m trying to import html file to create my pages structures, as custom index.
It works fine. I can inject elements inside (in {%app_entry%} markup).

Can i send elements inside custom DOM elements (if they have ids) ?
Can i send callbacks responses to this custom DOM, targeting ids ?

I create an HTML file with a complete DOM, and some div, tagged with ids
<body> ... <div id="test"></div> ... </body>
In my callback, i try to do :

Output(“test”, “children”)

But i receive this error :

ID not found in layout
Attempting to connect a callback Output item to component:
but no components with that id exist in the layout.

Is there a way to target a dom element by id, or declare theses elements as “outputable” ?

Many thanks for readers !

Hi @ArlyssFR were you able to figure out a solution to this issue? I am facing a similar problem

I removed my templates, and created a complete layout in python,
calling dcc or html components.

Very sad… :frowning:

:confused: yeah that it is sad, I also was not able to find a solution to my issue, I think it has to do with the dash_renderer code