CGBlog image full path

Have a question or a suggestion about a 3rd party addon module or plugin?
Let us know here.
Post Reply
andrewvideouk
Forum Members
Forum Members
Posts: 155
Joined: Thu Aug 20, 2020 10:49 pm

CGBlog image full path

Post 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.
User avatar
DIGI3
Dev Team Member
Dev Team Member
Posts: 1629
Joined: Wed Feb 25, 2009 4:25 am
Location: Victoria, BC

Re: CGBlog image full path

Post 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>
Not getting the answer you need? CMSMS support options
andrewvideouk
Forum Members
Forum Members
Posts: 155
Joined: Thu Aug 20, 2020 10:49 pm

Re: CGBlog image full path

Post 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
                                        )

                                )
andrewvideouk
Forum Members
Forum Members
Posts: 155
Joined: Thu Aug 20, 2020 10:49 pm

Re: CGBlog image full path

Post 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.
Post Reply

Return to “Modules/Add-Ons”