Custom fields

Post

Posted
Rating:
#2643 (In Topic #480)
Avatar
Standard member
Paul Flavel is in the usergroup ‘Honoured member’
I am wanting to further customise my downloads pages with the custom fields. However:

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.
 
Online now: No Back to the top

Post

Posted
Rating:
#2645
Avatar
Site director
Chris Graham is in the usergroup ‘Administrators’
We don't pass the data directly, you need to use some Tempcode. OTTOMH I think this would work to get the 1st field (#0).

{$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 Twitter. Follow me on Minds (where I am most active). Support me on Patreon

Was I helpful?
  • 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.
Online now: No Back to the top

Post

Posted
Rating:
#2652
Avatar
Standard member
Paul Flavel is in the usergroup ‘Honoured member’
Thanks Chris, that worked a treat. Added a version number to the downloads, and a couple of other fields.

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

Online now: No Back to the top
1 guest and 0 members have just viewed this.

Statistics

Back to Top