1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

XF 1.5 New posts - colored

Discussion in 'Styling and Customization Questions' started by JTL-Software, Jul 12, 2016.

  1. JTL-Software

    JTL-Software New Member

    Hi !

    We have for each category a different color-set and want to use the same color in the overview of "new posts". Is it possible to include the categorie-ID for each listen post, so i can create an CSS style to use colored title ? Here is the interesting part of the template "find_new_posts":

        <ol class="discussionListItems">
         <xen:foreach loop="$threads" value="$thread">
           <xen:if is="{$showingNewPosts} AND !{$_activityBarShown} AND {$thread.last_post_date} < {$session.previousActivity}">
             <li class="discussionListItem"><div class="noteRow">{xen:phrase threads_below_not_been_updated_since_last_visit_have_unread}</div></li>
             <xen:set var="$_activityBarShown">1</xen:set>
           <xen:include template="thread_list_item">
             <xen:set var="$showForumLink">1</xen:set>
             <xen:set var="$showLastPageNumbers">1</xen:set>
    Someone know how i can include the category-id in the class of li.discussionListItem ?
  2. JTL-Software

    JTL-Software New Member

    Oh sorry... the needed include is in thread_list_item:

    <xen:require css="discussion_list.css" />
    <xen:if is="{$thread.isDeleted}"><xen:include template="thread_list_item_deleted" /><xen:else />
    <li id="thread-{$thread.thread_id}" class="discussionListItem {$thread.discussion_state}{xen:if '!{$thread.discussion_open}', ' locked'}{xen:if {$thread.sticky}, ' sticky'}{xen:if {$thread.isNew}, ' unread'}{xen:if {$thread.prefix_id}, ' prefix{$thread.prefix_id}'}{xen:if {$thread.isIgnored}, ' ignored'} {xen:if $thread.thread_is_watched, threadWatched} {xen:if $thread.forum_is_watched, forumWatched}" data-author="{$thread.username}">
    What i need is the object : $category.node_id. Is it possible to catch it at this point with the primary node-id of the current thread ?

Share This Page