test
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • mugnainidavid Friend
    #198897

    Hi,
    i’d like to have k2 tools (archive) like this:

    2014
    2013
    2012
    2011

    then… only when you click on 2014 should be:

    2014
    ..June
    ..May
    ..April
    ..March
    ..February
    ..January
    2013
    2012
    2011

    At the time I was only able to do this (image 1):

    I worked archive.php:

    ?>
    <div id=”k2ModuleBox<?php echo $module->id; ?>” class=”k2ArchivesBlock<?php if($params->get(‘moduleclass_sfx’)) echo ‘ ‘.$params->get(‘moduleclass_sfx’); ?>”>

    <?php
    foreach ($months as $month) {
    $years[$month->y][] = $month;
    }
    ?>
    <?php foreach ($years as $year => $months) : ?>
    <h4><?php echo $year; ?></h4>
    <ul>
    <?php foreach ($months as $month): ?>
    <li>
    <?php if ($params->get(‘archiveCategory’, 0) > 0): ?>
    <a href=”<?php echo JRoute::_(‘index.php?option=com_k2&view=itemlist&task=date&month=’.$month->m.’&year=’.$month->y.’&catid=’.$params->get(‘archiveCategory’)); ?>”>
    <?php echo $month->name.’ ‘.$month->y; ?>
    <?php if ($params->get(‘archiveItemsCounter’)) echo ‘(‘.$month->numOfItems.’)’; ?>
    </a>
    <?php else: ?>
    <a href=”<?php echo JRoute::_(‘index.php?option=com_k2&view=itemlist&task=date&month=’.$month->m.’&year=’.$month->y); ?>”>
    <?php echo $month->name.’ ‘.$month->y; ?>
    <?php if ($params->get(‘archiveItemsCounter’)) echo ‘(‘.$month->numOfItems.’)’; ?>
    </a>
    <?php endif; ?>
    </li>
    <?php endforeach; ?>
    </ul>
    <?php endforeach; ?>
    </div>

    thanks


    1. Schermata-2014-06-16-alle-23.20.01
    alexsmirnov Friend
    #539135

    Hi there,

    We will be more than happy to help you with any issues you may have with your JoomlArt templates and extensions but for third party extensions like K2 you have to consult their respective developers/communities.

    Hope this helps,

    Regards,

    Alex

Viewing 2 posts - 1 through 2 (of 2 total)

This topic contains 2 replies, has 2 voices, and was last updated by  alexsmirnov 10 years, 6 months ago.

We moved to new unified forum. Please post all new support queries in our New Forum