Hide elements from Page Source Code

I want to hide some flows actions from source code from a page. ( Only show when user is Logged in). I have put inside a conditional region but when you go to source code of the page it still display.

Is any way to hide from source code??

<div id="conditional2" is="dmx-if" dmx-bind:condition="(lang.value == 'es')">

test condition

<script is="dmx-flow" id="closeCancel" type="text/dmx-flow">{
  runJS: {function: "closeModal", name: "closeModal", outputType: "text"}
}</script>

<script is="dmx-flow" id="closeUpdate" type="text/dmx-flow">[
  {
run: {action: "{{serverconnectform1.submit()}}", outputType: "text"}
  },
  {
run: {action: "{{BycomContent.load({})}}", outputType: "text"}
  },
  {
runJS: {function: "closeModal", name: "closeModal", outputType: "text"}
  }
]</script>
</div>

I am trying this method

<dmx-value id="lang" dmx-bind:value="'es'"></dmx-value>

<% if(lang.value == 'es') { %>
<div id="conditional2" is="dmx-if" dmx-bind:condition="(lang.value == 'es')">

test condition

<script is="dmx-flow" id="closeCancel" type="text/dmx-flow">{
  runJS: {function: "closeModal", name: "closeModal", outputType: "text"}
}</script>

<script is="dmx-flow" id="closeUpdate" type="text/dmx-flow">[
  {
run: {action: "{{serverconnectform1.submit()}}", outputType: "text"}
  },
  {
run: {action: "{{BycomContent.load({})}}", outputType: "text"}
  },
  {
runJS: {function: "closeModal", name: "closeModal", outputType: "text"}
  }
]</script>
</div>

<% }  %>

But I get this error.

message
: 
"/Volumes/Bycom/Websites/AH2023/views/layouts/blank.ejs:22\n    20| <body is=\"dmx-app\" id=\"blank\">\n    21|   <div is=\"dmx-view\" id=\"content\">\n >> 22|     <%- await include(content, locals); %>\n    23|   </div>\n    24|   <script src=\"/bootstrap/5/js/bootstrap.bundle.min.js\"></script>\n    25| </body>\n\n/Volumes/Bycom/Websites/AH2023/views/bycom.ejs:7\n    5| <dmx-value id=\"lang\" dmx-bind:value=\"'es'\"></dmx-value>\n    6| \n >> 7| <% if(lang.value == 'es') { %>\n    8| <div id=\"conditional2\" is=\"dmx-if\" dmx-bind:condition=\"(lang.value == 'es')\">\n    9| \n    10|     test condition\n\nlang is not defined"
stack
: 
"ReferenceError: /Volumes/Bycom/Websites/AH2023/views/layouts/blank.ejs:22\n    20| <body is=\"dmx-app\" id=\"blank\">\n    21|   <div is=\"dmx-view\" id=\"content\">\n >> 22|     <%- await include(content, locals); %>\n    23|   </div>\n    24|   <script src=\"/bootstrap/5/js/bootstrap.bundle.min.js\"></script>\n    25| </body>\n\n/Volumes/Bycom/Websites/AH2023/views/bycom.ejs:7\n    5| <dmx-value id=\"lang\" dmx-bind:value=\"'es'\"></dmx-value>\n    6| \n >> 7| <% if(lang.value == 'es') { %>\n    8| <div id=\"conditional2\" is=\"dmx-if\" dmx-bind:condition=\"(lang.value == 'es')\">\n    9| \n    10|     test condition\n\nlang is not defined\n    at eval (\"/Volumes/Bycom/Websites/AH2023/views/bycom.ejs\":12:8)\n    at bycom (/Volumes/Bycom/Websites/AH2023/node_modules/ejs/lib/ejs.js:703:17)\n    at include (/Volumes/Bycom/Websites/AH2023/node_modules/ejs/lib/ejs.js:701:39)\n    at eval (\"/Volumes/Bycom/Websites/AH2023/views/layouts/blank.ejs\":12:23)\n    at blank (/Volumes/Bycom/Websites/AH2023/node_modules/ejs/lib/ejs.js:703:17)\n    at tryHandleCache (/Volumes/Bycom/Websites/AH2023/node_modules/ejs/lib/ejs.js:274:36)\n    at View.exports.renderFile [as engine] (/Volumes/Bycom/Websites/AH2023/node_modules/ejs/lib/ejs.js:491:10)\n    at View.render (/Volumes/Bycom/Websites/AH2023/node_modules/express/lib/view.js:135:8)\n    at tryRender (/Volumes/Bycom/Websites/AH2023/node_modules/express/lib/application.js:657:10)\n    at Function.render (/Volumes/Bycom/Websites/AH2023/node_modules/express/lib/application.js:609:3)"
status
: 
"500"

Any help

The ejs data bindings only work with data where you have it bound to the page (app node in app structure UI for page)

Page variables are handled using JS after the page has already been rendered. My suggestion would be to bind the data you want to the page and use ejs conditions, linked to the bound data, to stop elements from rendering at all

How can I bind the data?? I am new on wappler. Any help??

The conditional region runs when the condition is true, so if you use the same value “es” in the variable and the conditional region it is normal that when you inspect the source code the flow actions are visible, try to replace the value in the variable and you will see that now when you examine the page the code will no longer be visible