[3.2.2] Dynamic Meta Description

Get help with installation and running phpBB 3.2.x here. Please do not post bug reports, feature requests, or extension related questions here.
Post Reply
daturbod
Registered User
Posts: 2
Joined: Fri May 25, 2018 1:02 pm

[3.2.2] Dynamic Meta Description

Post by daturbod » Fri May 25, 2018 1:36 pm

HeyGuys,

i would like to implement a dynamic meta description.

So the main forum should have a general meta description of the forum.
All other Forums should have a meta description like:

Code: Select all

<meta name="description" content="{FORUM_NAME} - {FORUM_DESC}" />
if subforum exists:

Code: Select all

<meta name="description" content="{FORUM_NAME} - {FORUM_DESC} - {SUBFORUM_NAME} - {SUBFORUM_DESC}" />
if topic exists:

Code: Select all

<meta name="description" content="{FORUM_NAME} - {FORUM_DESC} - {SUBFORUM_NAME} - {SUBFORUM_DESC} - {TOPIC_TITLE}" />
And i am not sure how to solve this.
Does anybody of you know how i can set a different meta description for the main forum page and how i put in a condition for the three other causes.

At the moment my solution looks like this:

Code: Select all

<meta name="description" content="{FORUM_NAME} - {FORUM_DESC} - {TOPIC_TITLE}" />
But now i always have these hyphons even though a subforum or topic doesnt exist in the page and the meta description for the main page is just empty.
[url]view-source:https://www.gis-netzwerk.com/forum/view ... 0&p=17#p17[/url]

I tried to implement a script but obviously im a html noob :oops:


Kind regards.

Post Reply

Return to “[3.2.x] Support Forum”

Who is online

Users browsing this forum: AmigoJack, BoDragon, HiFiKabin, hubaishan, Mannix_, Maroon Caludin, Mick, sakm, stevemaury and 48 guests