Putting a gallery in a sub-page

I have run into a file paths problem. I have a page here that I want to drop a gallery into but the full filepath is not showing in the rendered code. I can only assume that this is because it is in a folder.

so images are shown as content/media/hindon/hg1.jpg
rather than /content/media/hindon/hg1.jpg
How can I get the forward slash in there?

I have a gallery already in place, but in a page in site root.


Whats the fix here do you think?

Thanks @jdloudon - I think as you have this in root it should auto add the “/” – in config.php have you left the $path variable empty?

I did a test with sub folders and all was working as expected.

Bit cumbersome but just to test, can you find this in gal.php

if (!empty($path)) { $path_new = $path.'/'; }

Delete the condition “if (!empty($path))” in gal.php to give you:
$path_new = $path.’/’;

Let me know if that works!

1 Like

Hi Michael,
Yes the config file was not messed with at all - standard settings. I did as you suggested with gal.php though and now it works. So it clearly is a path issue bit I cannot see why!
Thanks very much for your help.

1 Like