IF FORUM_ID eq [SOLVED]

Need some custom code changes to the phpBB core simple enough that you feel doesn't require an extension? Then post your request here so that community members can provide some assistance.

NOTE: NO OFFICIAL SUPPORT IS PROVIDED IN THIS SUB-FORUM
Forum rules
READ: phpBB.com Board-Wide Rules and Regulations

NOTE: NO OFFICIAL SUPPORT IS PROVIDED IN THIS SUB-FORUM
User avatar
pxdetroit
Registered User
Posts: 60
Joined: Mon Nov 04, 2013 10:16 pm

IF FORUM_ID eq [SOLVED]

Post by pxdetroit »

.
Hopefully easiest question of the day.

You know that thing where you add <!-- IF FORUM_ID eq 17 --> to viewforum_body.html in order to display custom content?

That tip works great, very handy.

Anybody know the syntax for doing that for multiple FORUM_IDs?

Example: add custom content to forums 17, 75, 106, 8, 23, 14, 57, 2, etc, etc.... instead of just forum 17 (therefore listing each one separately with the same content which seems horribly inefficient)

Thank you!
Last edited by pxdetroit on Fri Apr 11, 2025 2:36 pm, edited 2 times in total.
User avatar
thecoalman
Community Team Member
Community Team Member
Posts: 6770
Joined: Wed Dec 22, 2004 3:52 am
Location: Pennsylvania, U.S.A.

Re: IF FORUM_ID eq

Post by thecoalman »

Try:

Code: Select all

{% if FORUM_ID in [17,75,106,8,23,14,57,2] %}
“Results! Why, man, I have gotten a lot of results! I have found several thousand things that won’t work.”

Attributed - Thomas Edison
User avatar
pxdetroit
Registered User
Posts: 60
Joined: Mon Nov 04, 2013 10:16 pm

Re: IF FORUM_ID eq

Post by pxdetroit »

That's it! Thank you so much!

Return to “phpBB Custom Coding”