Page 1 of 1

CGBlog image full path

Posted: Wed Dec 09, 2020 6:41 pm
by andrewvideouk
I am trying to work how to get the full path from the a image.

I am only geting part of the path

The path should be https://www.site.org.uk/uploads/images/ ... 030484.jpg
but only getting https://www.site.org.uk/uploads/Gallery/119030484.jpg

At the monent I got hard code /images/ which only works if I put a image inside /uploads/images

What tag should be using

Code: Select all

{if $field->type == 'image_select'}
{$field->name}:&nbsp;<img src="{uploads_url}/images/{$field->value}" alt="{$field->value}"/>
Thank you for your help guys.

Re: CGBlog image full path

Posted: Wed Dec 09, 2020 7:40 pm
by DIGI3
Take a look at the sample templates. I see:

Code: Select all

{$entry->file_location}
Don't forget you can always learn what an array contains by doing:

Code: Select all

<pre>{$entry|print_r}</pre>

Re: CGBlog image full path

Posted: Wed Dec 09, 2020 8:50 pm
by andrewvideouk
Did try {$entry->file_location} before

This the outout from it.

https://www.site.org.uk/uploads/cgblog/ ... 903048.jpg"

Should be

https://www.site.org.uk/uploads/images/ ... 030484.jpg

This is the output I got fron Print_r

Code: Select all

 [Image] => cgblog_field Object
                                (
                                    [_data:cgblog_field:private] => Array
                                        (
                                            [value] => Gallery/119030484_695811457947579_8767195418770232923_o.jpg
                                            [id] => 2
                                            [name] => Image
                                            [type] => image_select
                                        )

                                )

Re: CGBlog image full path

Posted: Sat Dec 12, 2020 11:27 pm
by andrewvideouk
I fixed it. I unstalled File PIcker and restalled it. Now works. Its seem to fixed other problems i had with files picking.