Page 1 of 1

[SOLVED] Gallery Module Custom Fields Not Working

Posted: Tue Aug 02, 2011 3:23 am
by mr.bacan
Hi everyone, I've been working with the Gallery Module sometime now and it's great, but I recently tried the Custom Fields option and I can't get it to work.

I'm using it like this: {$fields.date.value} to get the value of the custom field I created but it's not working. I tried {$fields.date.name} and I get the field name on screen, also tried {$fields.fechas.type} and I get the field type on screen. I can't figure out why the value is not showing.

I'm using CMSMS 1.9.4.2 with this modules:
CGExtensions 1.26.3
CGSimpleSmarty 1.4.8
CMSMailer 2.0.1
FileManager 1.1.0
FormBuilder 0.7
Gallery 1.4.4
MenuManager 1.7.6
ModuleManager 1.4.2
News 2.11.3
nuSOAP 1.0.2
Printing 1.1.2
Products 2.13.1
Search 1.6.10
Showtime 2.0.4
ThemeManager 1.1.4
TinyMCE

Could someone please give me a hand with this?

Thanks in advance.

Re: Gallery Module Custom Fields Not Working

Posted: Tue Aug 02, 2011 11:09 am
by Jos
I do not recognize this issue, it works for me...

Did you check the setting that it is a public field?

Re: Gallery Module Custom Fields Not Working

Posted: Tue Aug 02, 2011 1:51 pm
by mr.bacan
Jos wrote:Did you check the setting that it is a public field?
Yes Jos, the field is public and is set to affect galleries. I also created a new one to affect images and it doesn't work either.

Re: Gallery Module Custom Fields Not Working

Posted: Tue Aug 02, 2011 2:00 pm
by Jos
Just to be sure: did you add the {$fields.date.value} tag in the right Gallery template? ;)

If so, the only thing I can do is to offer you to have a look in your admin. If you want, you can PM me a temporary account.

Re: Gallery Module Custom Fields Not Working

Posted: Tue Aug 02, 2011 8:56 pm
by Jos
Thanks for having me take a look ;)

You used the gallery variable within the foreach loop for images/subgalleries.

So because you need the field value while you are not in the gallery itself, the values for your 'Fechas' variable are only available in the $images object-array.

So I changed {$fields.fechas.value} to {$image->fields.fechas.value} and now it works 8)

Re: Gallery Module Custom Fields Not Working

Posted: Tue Aug 02, 2011 9:11 pm
by mr.bacan
Thanks a lot for your valuable help Jos.
Now it's working as it should.

Is this a bug or it was just my lack of smarty knowledge? :D

Re: [SOLVED] Gallery Module Custom Fields Not Working

Posted: Tue Aug 02, 2011 9:29 pm
by Jos
This is not a bug, it was ment to work this way.

You would have noticed it directly if you had filled the value for the top gallery. But since it was empty, I guess it wasn't that obvious in your case ;)