franciccio-ITALIANO Posted May 23, 2023 Posted May 23, 2023 Hi, for a fixed image or script I was using this code: <script src="<?php echo $config->urls->templates?>styles/assets/plugins/jquery-1.10.2.js"></script> Then I decided to put a dynamic link in the template, i.e. variable from page to page, and I used this code: <script src="<?=$page->url_bg?>"></script> or: <img style="padding-left: 15px;" src="<?=$page->box_url_img_SX?>" alt="<?=$page->box_img_alt1?>"> But they don't work. Where do I go wrong?
flydev Posted May 23, 2023 Posted May 23, 2023 Hi, if you open the developer console, do you see one or more network’s error like 404 or 403 http code ?
franciccio-ITALIANO Posted May 23, 2023 Author Posted May 23, 2023 No, when I open I just get this message... which I couldn't solve Note: your current server locale setting isn’t working as expected with the UTF-8 charset and may cause minor issues. Your current locale setting is “C”. Please add this to your /site/config.php file (adjust “en_US.UTF-8” as needed): setlocale(LC_ALL,'en_US.UTF-8');
Gideon So Posted May 23, 2023 Posted May 23, 2023 Hi @franciccio-ITALIANO I suppose url_bg and box_url_img_SX both are image field. If it is the case, your code should be like <script src="<?= $page->url_bg->url ?>"></script> or: <img style="padding-left: 15px;" src="<?=$page->box_url_img_SX->url ?>" alt="<?=$page->box_img_alt1?>"> Gideon 2
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now