Custom fields
Posted
#2643
(In Topic #480)

Standard member

Using {FIELD_69} to display the contents of custom field_69 within the downloads template does not render.
Using:
{+START,PARAM_INFO}{+END}
Does not list the custom fields of the downloads either. The downloads template does not appear to work the same as the catalogues do.
Posted

Site director

{$CATALOGUE_ENTRY_FIELD_VALUE,{$CATALOGUE_ENTRY_FOR,download,{ID}},0}
I added a tracker issue, I like the idea of what you expected to happen:
0003269: Pass in custom field template parameters directly to content templates - Composr CMS feature tracker
Become a fan of Composr on Facebook or add me as a friend. Add me on on Mastodon. Follow me on Minds (where I am most active). Support me on Patreon
- If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
- If so, please let others know about Composr whenever you see the opportunity or support me on Patreon.
- If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying Composr on fun personal projects.
- If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Posted

Standard member

For those that want an explanation of why I wanted this and how I used it in the doanloads template.
Code
{+START,IF_NON_EMPTY,{$CATALOGUE_ENTRY_FIELD_VALUE,{$CATALOGUE_ENTRY_FOR,download,{ID}},0}}
<tr>
<th class="de_th metadata_title">Version</th>
<td>
{$CATALOGUE_ENTRY_FIELD_VALUE,{$CATALOGUE_ENTRY_FOR,download,{ID}},0}
</td>
</tr>
{+END}
Code
{+START,IF_NON_EMPTY,{$CATALOGUE_ENTRY_FIELD_VALUE,{$CATALOGUE_ENTRY_FOR,download,{ID}},0}}
The first call is to only show this field if it's not empty.
Code
{$CATALOGUE_ENTRY_FIELD_VALUE,{$CATALOGUE_ENTRY_FOR,download,{ID}},0}
Shows the content of the first custom field in the download, noting it starts from 0.

In your custom field ensure you have visible unticked. This way that field will only show in your new table entry per above pic.
So far there are 3 custom fields being used: Version (This should already be a download feature, but isn't so had to create a custom field), Compatible and Support (Referencing our support forum for the download).
Last edit: by Paul Flavel
1 guest and 0 members have just viewed this.