Open Nitinkumarwis opened 3 years ago
In your theme layout file you can use this syntax to load a theme related file:
<link rel="stylesheet" href="<?= phpb_theme_asset('css/style.css') ?>">
Next, this method is responsible for resolving the path to the asset of the currently active theme: https://github.com/HansSchouten/PHPageBuilder/blob/master/src/Core/helpers.php#L51
This is based on the theme.folder_url
and theme.active_theme
settings.
Can you check/debug whether this is working?
The issue I'm facing now is when i am changing the config parameters using this way and when i am using the functionality of view so at footer a 404 error is appearing i don't know why i am getting this please take a look at attached screenshot. According to my assumption i think the function handlePublicRequest() is setting the use_router as true and by default the user_router function is false in the pagebuilder config file so i think thats why the 404 error is appearing. config(['pagebuilder.theme.active_theme' => 'template-four']); $pageBuilder = new PHPageBuilder(config('pagebuilder')); $pageBuilder->handlePublicRequest();
Let me explain you what I am trying to do is that I am having four templates (template-one, template-two, template-three, template-four) and for each template having different css/js files. Currently template-three is set to active-theme, but I am trying to dynamic, whenever i was selecting template with any of these. But here I got an issue, when I am trying to select template-one, they are unable to getting the assets for template-one, they are getting the template-three assets which is statically set. And for this issue, my template design is getting wrong.
If the condition for the template id = 1 is running it is not getting the css/js file for template-one. It is getting the assets of the template-three which i have statically set in page builder config file. So, please help me how can i get out of this.