[SOLVED] GBFilePicker value.

Have a question or a suggestion about a 3rd party addon module or plugin?
Let us know here.
Post Reply
vicpug
Forum Members
Forum Members
Posts: 22
Joined: Mon Jul 12, 2010 1:58 pm

[SOLVED] GBFilePicker value.

Post by vicpug »

Hi, this works nicely in Admin
{content_module block="filepicker block" module="GBFilePicker" mode="browser" file_type="file"}, but how do I retrieve the selected 'filename' which is an image to display in the template?

thanks
Last edited by vicpug on Sun Sep 26, 2010 7:47 am, edited 1 time in total.
NaN

Re: GBFilePicker value.

Post by NaN »

GBFilePicker is no repalcement for {content_image} because the {content_module} tag will print out in frontend exactly what is stored in the db and no image. You should see the path of selected file in frontend where you placed the {content_module} tag.

GBFilePicker stores pathes relative to the uploads dir. That means if you select an image in uploads/images/image.jpg it will be stored as images/image.jpg.
In Frontend it will just print out this path. To make it an image use this in your template:

vicpug
Forum Members
Forum Members
Posts: 22
Joined: Mon Jul 12, 2010 1:58 pm

Re: GBFilePicker value.

Post by vicpug »

Yes I understand all of the above , but in a template ---
{content_module block="filepicker block" module="GBFilePicker" mode="browser" file_type="file"}
returns no value. Is there a trick?
cheers
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am
Location: Arizona

Re: GBFilePicker value.

Post by Dr.CSS »

Try using a single word for your block="filepicker block" call...
NaN

Re: GBFilePicker value.

Post by NaN »

Do not use whitespaces in block param.
At the moment this causes trouble (read here).
But this will be fixed in CMSms 1.9
vicpug
Forum Members
Forum Members
Posts: 22
Joined: Mon Jul 12, 2010 1:58 pm

Re: GBFilePicker value.

Post by vicpug »

This works nice now.  many thanks.
Post Reply

Return to “Modules/Add-Ons”