Jump to content
Дизайн и модификация IPS Community IPBSkinsBETA
Search In
  • More options...
Find results that contain...
Find results in...
Sign in to follow this  
Атаман

Теги в темах Ips 4x

Recommended Posts

Добрый! В теме отображаются теги в большом количестве, а можно как-то сделать отображение 5 шт, и рядом кнопку "раскрыть"

?

Share this post


Link to post
Share on other sites

Открыть Ваш шаблон / front / global / core / tags

Найти:

		<ul class='ipsTags ipsList_inline {{if $hideResponsive}}ipsResponsive_hidePhone ipsResponsive_inline{{endif}}' {{if $tagEditUrl}}data-controller='core.front.core.tagEditor' data-tagEditID='{$id}' {{if \IPS\Settings::i()->tags_min}}data-minTags='{setting="tags_min"}'{{endif}} {{if \IPS\Settings::i()->tags_max}}data-maxTags='{setting="tags_max"}'{{endif}}{{endif}}>
			{{if \count( $tags )}}
				{{foreach $tags as $tag}}
					{template="tag" group="global" app="core" params="$tag, $tagEditUrl"}
				{{endforeach}}
			{{endif}}
			{{if $tagEditUrl}}
				<li class='ipsTags_edit'>
					<a href="{$tagEditUrl->setQueryString( 'do', 'editTags' )}" title="{lang="edit_tags"}" data-ipsMenu data-ipsMenu-closeOnClick='false' id='elTagEditor_{$id}' class='ipsButton ipsButton_veryVerySmall ipsButton_light'><i class='fa fa-plus'></i>{{if !\count( $tags )}} {lang="add_tags"}{{endif}}</a>
				</li>
			{{endif}}
		</ul>

Заменить на:

		<ul class='ipsTags ipsTags_inline ipsList_inline {{if $hideResponsive}}ipsResponsive_hidePhone ipsResponsive_inline{{endif}}'  {{if $tagEditUrl}}data-controller='core.front.core.tagEditor' data-tagEditID='{$id}' {{if \IPS\Settings::i()->tags_min}}data-minTags='{setting="tags_min"}'{{endif}} {{if \IPS\Settings::i()->tags_max}}data-maxTags='{setting="tags_max"}'{{endif}}{{endif}}>
			{{if \count( $tags )}}
				{{foreach $tags as $idx => $tag}}
					{{if $idx < 5}}
						{template="tag" group="global" app="core" params="$tag, $tagEditUrl"}
					{{endif}}
				{{endforeach}}
			{{endif}}
			{{if \count( $tags ) > 5}}
				<li class='ipsType_small'>
					<span class='ipsType_light ipsCursor_pointer' data-ipsMenu id='elTags_{$id}'>{lang="and_x_more" pluralize="\count( $tags ) - 5"} <i class='fa fa-caret-down ipsJS_show'></i></span>
					<div class='ipsHide ipsMenu ipsMenu_normal ipsPad_half cTagPopup' id='elTags_{$id}_menu'>
						<p class='ipsType_medium ipsType_reset ipsType_light'>{lang="tagged_with"}</p>
						<ul class='ipsTags ipsList_inline'>
							{{foreach $tags as $tag}}
								{template="tag" group="global" app="core" params="$tag, NULL"}
							{{endforeach}}
						</ul>
					</div>
				</li>
			{{endif}}
			{{if $tagEditUrl}}
				<li class='ipsTags_edit'>
					<a href="{$tagEditUrl->setQueryString( 'do', 'editTags' )}" title="{lang="edit_tags"}" data-ipsMenu data-ipsMenu-closeOnClick='false' id='elTagEditor_{$id}' class='ipsButton ipsButton_veryVerySmall ipsButton_light'><i class='fa fa-plus'></i>{{if !\count( $tags )}} {lang="add_tags"}{{endif}}</a>
				</li>
			{{endif}}
		</ul>

 

Результат:

image.png

  • Upvote 2

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...