Skip to content

Commit

Permalink
added microdata
Browse files Browse the repository at this point in the history
  • Loading branch information
LivioCavallo committed Aug 23, 2017
1 parent 66385b5 commit cad677c
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions components/com_tags/views/tag/tmpl/default_items.php
Original file line number Diff line number Diff line change
Expand Up @@ -68,19 +68,19 @@
<p> <?php echo JText::_('COM_TAGS_NO_ITEMS'); ?></p>
<?php else : ?>

<ul class="category list-striped">
<ul class="category list-striped" itemscope itemtype="http://schema.org/ItemList">
<?php foreach ($items as $i => $item) : ?>
<?php if ($item->core_state == 0) : ?>
<li class="system-unpublished cat-list-row<?php echo $i % 2; ?>">
<li class="system-unpublished cat-list-row<?php echo $i % 2; ?>" itemprop="itemListElement" itemscope itemtype="https://schema.org/ListItem">
<?php else : ?>
<li class="cat-list-row<?php echo $i % 2; ?> clearfix" >
<li class="cat-list-row<?php echo $i % 2; ?> clearfix" itemprop="itemListElement" itemscope itemtype="https://schema.org/ListItem">
<?php if (($item->type_alias === 'com_users.category') || ($item->type_alias === 'com_banners.category')) : ?>
<h3>
<h3 itemprop="name">
<?php echo $this->escape($item->core_title); ?>
</h3>
<?php else : ?>
<h3>
<a href="<?php echo JRoute::_(TagsHelperRoute::getItemRoute($item->content_item_id, $item->core_alias, $item->core_catid, $item->core_language, $item->type_alias, $item->router)); ?>">
<h3 itemprop="name">
<a href="<?php echo JRoute::_(TagsHelperRoute::getItemRoute($item->content_item_id, $item->core_alias, $item->core_catid, $item->core_language, $item->type_alias, $item->router)); ?>" itemprop="url">
<?php echo $this->escape($item->core_title); ?>
</a>
</h3>
Expand All @@ -90,14 +90,14 @@
<?php echo $item->event->afterDisplayTitle; ?>
<?php $images = json_decode($item->core_images); ?>
<?php if ($this->params->get('tag_list_show_item_image', 1) == 1 && !empty($images->image_intro)) : ?>
<a href="<?php echo JRoute::_(TagsHelperRoute::getItemRoute($item->content_item_id, $item->core_alias, $item->core_catid, $item->core_language, $item->type_alias, $item->router)); ?>">
<img src="<?php echo htmlspecialchars($images->image_intro); ?>" alt="<?php echo htmlspecialchars($images->image_intro_alt); ?>">
<a href="<?php echo JRoute::_(TagsHelperRoute::getItemRoute($item->content_item_id, $item->core_alias, $item->core_catid, $item->core_language, $item->type_alias, $item->router)); ?>" itemprop="url">
<img src="<?php echo htmlspecialchars($images->image_intro); ?>" alt="<?php echo htmlspecialchars($images->image_intro_alt); ?>" itemprop="image">
</a>
<?php endif; ?>
<?php if ($this->params->get('tag_list_show_item_description', 1)) : ?>
<?php // Content is generated by content plugin event "onContentBeforeDisplay" ?>
<?php echo $item->event->beforeDisplayContent; ?>
<span class="tag-body">
<span class="tag-body" itemprop="description">
<?php echo JHtml::_('string.truncate', $item->core_body, $this->params->get('tag_list_item_maximum_characters')); ?>
</span>
<?php // Content is generated by content plugin event "onContentAfterDisplay" ?>
Expand Down

0 comments on commit cad677c

Please sign in to comment.