Keyword

How to add Custom Field in category_item.php?

  • joomGO
  • joomGO's Avatar Topic Author
  • Offline
  • Junior Member
More
13 years 5 months ago #95993 by joomGO
dev.joomgo.com/clients/tig/news-events/events

 

I need to pull a custom field value and have it display in each item on the category page. You see the title is already there for each time - "Event Location:"

 

I'm not sure what code to add into the category_item.php file to pull the custom field value and have it display next to "Event Location:"

 

Thanks for any help!

Please Log in or Create an account to join the conversation.

  • joomGO
  • joomGO's Avatar Topic Author
  • Offline
  • Junior Member
More
13 years 5 months ago #95994 by joomGO
FYI: I changed "Event Location:" to "Event City:" Just so there is no confusion.

Please Log in or Create an account to join the conversation.

  • joomGO
  • joomGO's Avatar Topic Author
  • Offline
  • Junior Member
More
13 years 5 months ago #95995 by joomGO
Figured it out!

<div class="itemToolbarCat">            <ul class="itemMeta">              <?php if($this->item->params->get('catItemExtraFields')): ?>                <li>                    <!-- Item category name -->                        <span class="itemCategory"><strong>Event Location:</strong></span> <?php echo $this->item->extra_fields[2]->value; ?>                </li>                <?php endif; ?>                            </ul>            <div class="clr"></div>        </div>

 

Please Log in or Create an account to join the conversation.


Powered by Kunena Forum