drs135's avatar

Pass a variable through a meta tag

I am trying to create a dark and light theme using Vuetify, therefore I want to pass a variable through the meta tag to toggle between the themes.

 <meta name="theme" content="{{themeData()}}">
<script>
let themeData = "test??";
</script>

I want to pass the data of the variable through to the content

0 likes
2 replies
Snapey's avatar

if you are wanting to pass a php variable via blade file then you need to use php syntax

is themeData a php function?

Have you registered it globally?

or is it a variable, in which case you should use {{ $themeData }}

drs135's avatar

Its a javascript variable, and all i want is to pass a true or false through the content so i can use it in all of my Vue components as a boolean to whether i should use light theme or dark theme.

Please or to participate in this conversation.