Strona 1 z 1

Kolorowy badge "Nowe posty"

: 17 lut 2015, 18:03
autor: Macsch15
Efekt:
pre_1400065103__2014-05-14_12-58-05.png


Otwieramy w szablonach bit boardIndexTemplate, znajdujemy:
<a href="{parse url="showforum={$forum_data['id']}" seotitle="{$forum_data['name_seo']}" template="showforum" base="public"}" title='{parse expression="IPSText::striptags( IPSText::htmlspecialchars( $forum_data['name'] ) )"}'>{$forum_data['name']}</a>


I pod nim dodajemy:
    <if test="hasUnread:|:$forum_data['_has_unread']">
        <span class="ipsBadge badge_orange">Nowe posty</span>
    </if>


Trzeba zaznaczyć że w tym bicie są dwa takie same fragmenty:
<a href="{parse url="showforum={$forum_data['id']}" seotitle="{$forum_data['name_seo']}" template="showforum" base="public"}" title='{parse expression="IPSText::striptags( IPSText::htmlspecialchars( $forum_data['name'] ) )"}'>{$forum_data['name']}</a>


Jeden jest do przekierowania (który nas nie interesuje) a drugi do forum.