Calling custom forum field

Post

Posted
Rating:
#2843 (In Topic #514)
Avatar
Standard member
Paul Flavel is in the usergroup ‘Honoured member’
I have created a custom forum field. However I am unable to find a way to call this field using +START,IF

Any assistance with this would be appreciated.

Similar to: https://compo.sr/forum/topicview/browse/designing/custom-fields.htm but for forums

Last edit: by Paul Flavel

Online now: No Back to the top

Post

Posted
Rating:
#2844
Avatar
Standard member
Jason Verhagen is in the usergroup ‘Community saint’
I haven't used custom forum fields myself so I'm not sure what, if anything, is possible with tempcode. If you want to see if these custom forum fields are made available as tempcode parameters in a template, try adding this to the template you are working with:


{+START,IF,{$IS_ADMIN}}{+START,PARAM_INFO}{+END}{+END}


This will show a table of parameter names and their values. The above code will only display this table for admins (good if working on a live site), so be sure you are logged in as admin. If you working on a test site or need to test against non-admins, remove the first +START block and last +END block and just use {+START,PARAM_INFO}{+END}.

Regards,
Jason


My ocPortal Sites: Holleywood Studio / Tech Fusion Online
My Composr Sites: NEWBotics Labs
Online now: No Back to the top

Post

Posted
Rating:
#2845
Avatar
Standard member
Paul Flavel is in the usergroup ‘Honoured member’
Tried that. Unfortunately that seems quite limited. It doesn't show custom fields, which I thought was quite odd.

Even in: Custom fields - Composr it didn't show the custom fields.
Online now: No Back to the top

Post

Posted
Rating:
#2846
Avatar
Standard member
Paul Flavel is in the usergroup ‘Honoured member’
Found it. Bit of code digging.

Code

    {+START,IF_NON_EMPTY,{$CATALOGUE_ENTRY_FOR,forum,{ID}}}{$CATALOGUE_ENTRY_ALL_FIELD_VALUES,{$CATALOGUE_ENTRY_FOR,forum,{ID}}}{+END}
Online now: No Back to the top

Post

Posted
Rating:
#2847
Avatar
Standard member
Jason Verhagen is in the usergroup ‘Community saint’
Sorry, missed that in the first post  :$

Nice find! Gotta love the flexibility of Composr Tempcode :)

Regards,
Jason


My ocPortal Sites: Holleywood Studio / Tech Fusion Online
My Composr Sites: NEWBotics Labs
Online now: No Back to the top

Post

Posted
Rating:
Item has a rating of 5 (Liked by Jason Verhagen)
#2848
Avatar
Standard member
Paul Flavel is in the usergroup ‘Honoured member’
Once you start getting your head around it, it's amazing.

I am doing a template edit, using a custom field and conditions. This will allow custom icons for the forums, and when there is no custom icon it will fallback to the default forum icon.

Once I have this finished I will share in the design forum.
Online now: No Back to the top
1 guest and 0 members have just viewed this.

Statistics

Users online:

deepu_ms, Manu, Salman, Paul D, MVLipwig, John Connor, amit.nigam

Forum statistics:
  • 1,071 topics, 5,166 posts, 6,018 members
  • Our newest member is graffitienz
Birthdays:
Back to Top