Judah Raine
Total posts: 332
27 Oct 2012 09:02

I know, you're probably ready to strangle me ._. I've been through your tutorial on templates and I've found this:

fields_by_id[12])): ?>
<span class="field-year">

    <?php echo $item->fields_by_id[12]->result; ?>

</span>

I assume this is what I need to be able to show only specific fields in the article list, e.g. Title, Genre as opposed to all 15. I have looked at the field parameters as well (Mighty resources allowed them to be excluded in the backend, sigh). I also assume that I would need to specify the field IDs.

I simply have no idea where to insert this in my default_list_review_requests.php. I have found this:

total_fields_keys AS $field):?>
            <th width="1%" nowrap="nowrap">

                <?php echo JText::_($field->label);?></th>

        <?php endforeach;?>

Do I replace this with the above? (Thanks )

I just have no idea where to insert this in the list template

Last Modified: 02 Mar 2014


Sackgesicht VIP
Total posts: 1,636
27 Oct 2012 18:35

Judah,

if i understood you correctly, you want to display only some of your 15 created fields in your article list.

You can achieve this without touching any template or write a single line of code.

For every field, you can define where it will be displayed under GENERAL PARAMETERS -> General properties.

The parameter "Show intro" will allow you to display articles in the list view. "Show full" will influence the display in the single article view.


Judah Raine
Total posts: 332
28 Oct 2012 01:27

Ah, so simple... thank you! And so obvious, can't believe I missed it.:D

Powered by Cobalt