I've added a custom field, called Price. This shows up in the list of photos in an album. However it doesn't show when I view a single photo. I've been banging my head on this for ages and am desperate for an answer. I've read the customisation guide, and I've read all about smarty. I'm still confused. I've turned on debug output and searched for "customfield" and "Price", but neither appear, and thats with
placed in the template at the top. What am I missing?
Thanks for putting up with my stupiditiy
[EDIT] Forgot to mention that both of these fields appear in the debug output when I view them in album mode, it's just they don't in photo.
shocksll
Joined: 2005-06-22
Posts: 352
Posted: Tue, 2005-08-30 16:44
Do you have it set as a Detail or Summary? The callback only returns fields that have the detail checkbox turned on. Also, is this a common Custom Field?
A_Bloke
Joined: 2005-08-23
Posts: 13
Posted: Tue, 2005-08-30 16:52
It has both summary and detail boxes checked.
Common Custom Field? Not sure, I added the custom field module, then added it in there. How can I tell if its common?
Thanks for the lightning reply.
A_Bloke
Joined: 2005-08-23
Posts: 13
Posted: Tue, 2005-08-30 16:56
Oh, I've just seen what you mean. There are 3 columns. It's in the Photo (Right hand) column. Is that where I went wrong?
A_Bloke
Joined: 2005-08-23
Posts: 13
Posted: Tue, 2005-08-30 17:07
Guess not, because I added a Common field, and had only detail enabled, and it still didn't show. More confusion.
A_Bloke
Joined: 2005-08-23
Posts: 13
Posted: Tue, 2005-08-30 17:11
Which bit of code in the template should be showing the custom fields?
shocksll
Joined: 2005-06-22
Posts: 352
Posted: Tue, 2005-08-30 18:53
In my custom theme I outputted the price custom field like this:
None of those worked...however I found out what does, and it's simple, of course.
I went to the Admin section, and edited the theme, and added Custom Fields to the Photo.tpl list. Then it appeared, how silly of me. Much thanks for your help, it helped me understand what was going on a little more.
Posts: 352
Check out this thread.
http://gallery.menalto.com/index.php?name=PNphpBB2&file=viewtopic&t=32713&highlight=custom+field
Posts: 25
Thanks Shocksll :D
Posts: 13
I think I'm having a dumb moment.
I've added a custom field, called Price. This shows up in the list of photos in an album. However it doesn't show when I view a single photo. I've been banging my head on this for ages and am desperate for an answer. I've read the customisation guide, and I've read all about smarty. I'm still confused. I've turned on debug output and searched for "customfield" and "Price", but neither appear, and thats with
{g->callback type="customfield.LoadCustomFields" itemId=$theme.item.id}
placed in the template at the top. What am I missing?
Thanks for putting up with my stupiditiy
[EDIT] Forgot to mention that both of these fields appear in the debug output when I view them in album mode, it's just they don't in photo.
Posts: 352
Do you have it set as a Detail or Summary? The callback only returns fields that have the detail checkbox turned on. Also, is this a common Custom Field?
Posts: 13
It has both summary and detail boxes checked.
Common Custom Field? Not sure, I added the custom field module, then added it in there. How can I tell if its common?
Thanks for the lightning reply.
Posts: 13
Oh, I've just seen what you mean. There are 3 columns. It's in the Photo (Right hand) column. Is that where I went wrong?
Posts: 13
Guess not, because I added a Common field, and had only detail enabled, and it still didn't show. More confusion.
Posts: 13
Which bit of code in the template should be showing the custom fields?
Posts: 352
In my custom theme I outputted the price custom field like this:
In the photo.tpl, you may need to add showSummaries=true to the iteminfo block. So change
to
See if that does it.
Posts: 13
None of those worked...however I found out what does, and it's simple, of course.
I went to the Admin section, and edited the theme, and added Custom Fields to the Photo.tpl list. Then it appeared, how silly of me. Much thanks for your help, it helped me understand what was going on a little more.
*Tips his hat in your direction*