item title override in k2

Ecommerce design Joomla template to start your online business with VirtueMart and additional eshop features.
GK User
Fri Mar 15, 2013 12:48 pm
Hello,

I have noticed in the page source of k2 that every article starts with an item title with <h2> tags.
So by default a webpage will have a k2 section with no h1 tags, which I assume is not recommended for search engines because <h1> always comes before <h2>. This is correct right?

So what i did was to change the item.php in the override /template../html/com_k2/templates/default/item.php
with the following:

Code: Select all
 <h1 class="itemTitle">
                <?php echo $this->item->title; ?>
                <?php if($this->item->params->get('itemFeaturedNotice') && $this->item->featured): ?>
               
                <!-- Featured flag -->
               
                <span><sup><?php echo JText::_('K2_FEATURED'); ?></sup></span>
                <?php endif; ?>
            </h1>


My question is: Is it possible to do this override from the actual template override css?
Is there a better way of doing this?

Thanks and best regards,
User avatar
Junior Boarder

Konrad M
Fri Mar 15, 2013 1:00 pm
Hi,
this change you made is best way.
User avatar


cron