Quantcast
Viewing all articles
Browse latest Browse all 2308

phpBB Custom Coding • Re: Subforum ID on Index

In the forumlist_body.html template you have to add the FORUM_ID between the BEGIN and END tags using {forumrow.subforum.FORUM_ID} like this.

Code:

<!-- BEGIN subforum --><!-- EVENT forumlist_body_subforum_link_prepend --><a href="{forumrow.subforum.U_SUBFORUM}" class="subforum<!-- IF forumrow.subforum.S_UNREAD --> unread<!-- ELSE --> read<!-- ENDIF -->" title="{% if forumrow.subforum.IS_LINK %}{{ lang('FORUM_LINK') }}{% elseif forumrow.subforum.S_UNREAD %}{{ lang('UNREAD_POSTS') }}{% else %}{{ lang('NO_UNREAD_POSTS') }}{% endif %}"><i class="icon <!-- IF forumrow.subforum.IS_LINK -->fa-external-link<!-- ELSE -->fa-file-o<!-- ENDIF --> fa-fw <!-- IF forumrow.subforum.S_UNREAD --> icon-red<!-- ELSE --> icon-blue<!-- ENDIF --> icon-md" aria-hidden="true"></i>{forumrow.subforum.SUBFORUM_NAME}-{forumrow.subforum.FORUM_ID}</a><!-- IF not forumrow.subforum.S_LAST_ROW -->{L_COMMA_SEPARATOR}<!-- ENDIF --><!-- EVENT forumlist_body_subforum_link_append --><!-- END subforum -->
To list the FORUM_ID for a forum in that template you would use {forumrow.FORUM_ID} like this.

Code:

<a href="{forumrow.U_VIEWFORUM}" class="forumtitle">{forumrow.FORUM_NAME}-{forumrow.FORUM_ID}</a><!-- IF forumrow.FORUM_DESC --><br />{forumrow.FORUM_DESC}<!-- ENDIF -->
In a class (eg, class="subforum-{forumrow.subforum.FORUM_ID}")
Yeah, unfortunately, {forumrow.subforum.FORUM_ID} does not print on the index. it ends up as class="subforum-". Thank you for trying, though!

Statistics: Posted by Farraday — Fri May 10, 2024 11:26 pm



Viewing all articles
Browse latest Browse all 2308

Trending Articles