Hello Everyone,
I have a query, How can i put this code "<?php echo $CFG->wwwroot ?>" into settings.php page? see below picture.Because if we use direct url image not showing offline default.Please give some suggestion.
Thanks,Advance.
Dear Mark,
Ok, firstly what version of Moodle are you running as the answer depends on it? Secondly given the wording of the question I'm concerned that you don't know enough PHP to get by and complete the task and thus will only bump into more issues, therefore I recommend doing a PHP course first, like https://www.w3schools.com/php/default.asp.
Gareth
Thank you for your reply Gareth.
My moodle version is 3.3. Yes you are right, i have no knoledge into php and development.
I have done this, can you please check this code? This is the right process ?or any suggestion for me?
Thank you.
Hi, instead of the code you added try this Instead...
$default = new moodle_url('theme/mytheme/pix/slides/slider1.jpg');
I was thinking more along the lines of 'image_url' (update on M3.3 from pix_url): https://docs.moodle.org/dev/Using_images_in_a_theme#Using_your_images_within_your_layout_files
Hello Mary,
Thank you for your reply. yes this is working fine.
Thank you Again.