-
AuthorPosts
-
mugnainidavid Friend
mugnainidavid
- Join date:
- August 2013
- Posts:
- 8
- Downloads:
- 0
- Uploads:
- 6
- Thanks:
- 2
- Thanked:
- 1 times in 1 posts
June 16, 2014 at 9:49 pm #198897Hi,
i’d like to have k2 tools (archive) like this:2014
2013
2012
2011then… only when you click on 2014 should be:
2014
..June
..May
..April
..March
..February
..January
2013
2012
2011At 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
alexsmirnov Friendalexsmirnov
- Join date:
- July 2012
- Posts:
- 786
- Downloads:
- 1
- Uploads:
- 226
- Thanks:
- 226
- Thanked:
- 163 times in 119 posts
June 17, 2014 at 12:43 am #539135Hi 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
1 user says Thank You to alexsmirnov for this useful post
AuthorPostsViewing 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
k2 tools sort by year and then by month
Viewing 2 posts - 1 through 2 (of 2 total)