Jump to content

Sub-Topic Organized


Warning Family

Recommended Posts

Hello, here is a tutorial to organize  the subforums in different type of columns, its work on 4.4.x !

Go to forums - index - forumrow and search for this :

	{{if $forum->hasChildren()}}
				<ul class="ipsDataItem_subList ipsList_inline">
					{{foreach $forum->children() as $subforum}}
						<li class="{{if \IPS\forums\Topic::containerUnread( $subforum )}}ipsDataItem_unread{{endif}}">
							<a href="{$subforum->url()}">{{if \IPS\forums\Topic::containerUnread( $subforum )}}<span class='ipsItemStatus ipsItemStatus_tiny {{if !\IPS\forums\Topic::containerUnread( $subforum ) && !$subforum->redirect_on}}ipsItemStatus_read{{endif}}'><i class="fa fa-circle"></i></span>&nbsp;{{endif}}{$subforum->_title}</a>
						</li>
					{{endforeach}}
				</ul>
			{{endif}}
			{{if $forum->description}}
				{template="richText" group="global" app="core" location="global" params="$forum->description, array('ipsDataItem_meta', 'ipsContained')"}
			{{endif}}

replace the code with this :

{{if $forum->description}}
				{template="richText" group="global" app="core" location="global" params="$forum->description, array('ipsDataItem_meta', 'ipsContained')"}
			{{endif}}
			{{if $forum->hasChildren()}}
				<ul class="ipsDataItem_subList ipsList_inline">
					{{foreach $forum->children() as $subforum}}
						<li class="{{if \IPS\forums\Topic::containerUnread( $subforum )}}ipsDataItem_unread{{endif}}">
							<a href="{$subforum->url()}">{$subforum->_title}</a>
						</li>
					{{endforeach}}
				</ul>
			{{endif}}

add in the custom.css the next code :

.ipsApp .cForumRow .ipsDataItem_subList {
    padding: 0 !important;
    background-image: none !important;
    display: grid;
    grid-template-columns: repeat(2, 50%);
}
 
.ipsApp .cForumRow .ipsDataItem_subList li:before {
    content: '\f07b';
    font-family: "FontAwesome";
}
 
.ipsApp .cForumRow .ipsDataItem_subList li.ipsDataItem_unread:before {
    content: '\f07c';
    font-family: "FontAwesome";
}
 
.ipsDataItem_subList li a:before {
    content: ;
}

 

Link to comment
Share on other sites

On 03/12/2019 at 11:03 AM, sebastiancgames said:

Hello, here is a tutorial to organize  the subforums in different type of columns, its work on 4.4.x !

Go to forums - index - forumrow and search for this :


	{{if $forum->hasChildren()}}
				<ul class="ipsDataItem_subList ipsList_inline">
					{{foreach $forum->children() as $subforum}}
						<li class="{{if \IPS\forums\Topic::containerUnread( $subforum )}}ipsDataItem_unread{{endif}}">
							<a href="{$subforum->url()}">{{if \IPS\forums\Topic::containerUnread( $subforum )}}<span class='ipsItemStatus ipsItemStatus_tiny {{if !\IPS\forums\Topic::containerUnread( $subforum ) && !$subforum->redirect_on}}ipsItemStatus_read{{endif}}'><i class="fa fa-circle"></i></span>&nbsp;{{endif}}{$subforum->_title}</a>
						</li>
					{{endforeach}}
				</ul>
			{{endif}}
			{{if $forum->description}}
				{template="richText" group="global" app="core" location="global" params="$forum->description, array('ipsDataItem_meta', 'ipsContained')"}
			{{endif}}

replace the code with this :


{{if $forum->description}}
				{template="richText" group="global" app="core" location="global" params="$forum->description, array('ipsDataItem_meta', 'ipsContained')"}
			{{endif}}
			{{if $forum->hasChildren()}}
				<ul class="ipsDataItem_subList ipsList_inline">
					{{foreach $forum->children() as $subforum}}
						<li class="{{if \IPS\forums\Topic::containerUnread( $subforum )}}ipsDataItem_unread{{endif}}">
							<a href="{$subforum->url()}">{$subforum->_title}</a>
						</li>
					{{endforeach}}
				</ul>
			{{endif}}

add in the custom.css the next code :


.ipsApp .cForumRow .ipsDataItem_subList {
    padding: 0 !important;
    background-image: none !important;
    display: grid;
    grid-template-columns: repeat(2, 50%);
}
 
.ipsApp .cForumRow .ipsDataItem_subList li:before {
    content: '\f07b';
    font-family: "FontAwesome";
}
 
.ipsApp .cForumRow .ipsDataItem_subList li.ipsDataItem_unread:before {
    content: '\f07c';
    font-family: "FontAwesome";
}
 
.ipsDataItem_subList li a:before {
    content: ;
}

 

5UrDCaP.png

When I replaced it in forumrow this happened.
In custom.css everything went well.

My version is 4.3

Edited by Warning Family
Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...