-
Notifications
You must be signed in to change notification settings - Fork 42
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add css calss "first", "last", "even" and "odd"
- Loading branch information
1 parent
0db0947
commit caf5222
Showing
4 changed files
with
34 additions
and
12 deletions.
There are no files selected for viewing
13 changes: 9 additions & 4 deletions
13
src/system/modules/metamodels/templates/mm_filteritem_linklist.html5
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,20 @@ | ||
<?php if(is_array($this->options) && count($this->options)>0): ?> | ||
<ul> | ||
<?php foreach($this->options as $option): | ||
<?php $intI = 0; foreach($this->options as $option): | ||
$strClass = ($intI == 0) ? 'first ' : ''; | ||
$strClass .= ($intI == count($this->options) - 1 ) ? 'last ' : ''; | ||
$strClass .= ($intI % 2 == 1) ? 'even' : 'odd'; | ||
$strClass .= (strlen($option['class'])) ? ' ' . $option['class'] : ''; | ||
|
||
$link = sprintf('<a href="%s" class="%s" title="%s"><span class="action">%s </span>%s</a>', | ||
$option['href'], | ||
$option['class'], | ||
$strClass, | ||
$option['value'], | ||
($option['action'] ? $GLOBALS['TL_LANG']['metamodels_frontendfilter']['action_'.$option['action']] : ''), | ||
$option['value'] | ||
); | ||
?> | ||
<li class="<?php echo $option['class']; ?>"><?php echo $link; ?></li> | ||
<?php endforeach; ?> | ||
<li class="<?php echo $strClass; ?>"><?php echo $link; ?></li> | ||
<?php $intI++; endforeach; ?> | ||
</ul> | ||
<?php endif; ?> |
13 changes: 9 additions & 4 deletions
13
src/system/modules/metamodels/templates/mm_filteritem_linklist.xhtml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,20 @@ | ||
<?php if(is_array($this->options) && count($this->options)>0): ?> | ||
<ul> | ||
<?php foreach($this->options as $option): | ||
<?php $intI = 0; foreach($this->options as $option): | ||
$strClass = ($intI == 0) ? 'first ' : ''; | ||
$strClass .= ($intI == count($this->options) - 1 ) ? 'last ' : ''; | ||
$strClass .= ($intI % 2 == 1) ? 'even' : 'odd'; | ||
$strClass .= (strlen($option['class'])) ? ' ' . $option['class'] : ''; | ||
|
||
$link = sprintf('<a href="%s" class="%s" title="%s"><span class="action">%s </span>%s</a>', | ||
$option['href'], | ||
$option['class'], | ||
$strClass, | ||
$option['value'], | ||
($option['action'] ? $GLOBALS['TL_LANG']['metamodels_frontendfilter']['action_'.$option['action']] : ''), | ||
$option['value'] | ||
); | ||
?> | ||
<li class="<?php echo $option['class']; ?>"><?php echo $link; ?></li> | ||
<?php endforeach; ?> | ||
<li class="<?php echo $strClass; ?>"><?php echo $link; ?></li> | ||
<?php $intI++; endforeach; ?> | ||
</ul> | ||
<?php endif; ?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters