Page 1 of 1
[SOLVED] GBFilePicker value.
Posted: Sat Sep 25, 2010 12:39 am
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
Re: GBFilePicker value.
Posted: Sat Sep 25, 2010 11:44 am
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:
Re: GBFilePicker value.
Posted: Sat Sep 25, 2010 1:47 pm
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
Re: GBFilePicker value.
Posted: Sat Sep 25, 2010 1:59 pm
by Dr.CSS
Try using a single word for your block="filepicker block" call...
Re: GBFilePicker value.
Posted: Sat Sep 25, 2010 2:28 pm
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
Re: GBFilePicker value.
Posted: Sun Sep 26, 2010 7:47 am
by vicpug
This works nice now. many thanks.