DNNCommunity / Dnn.CommunityForums

Open-source forums module for DNN Platform. This is a fork and continuance of the Active Forums module.
https://dnncommunity.org
Other
13 stars 21 forks source link

Latest Forums posts > add forums page as token #369

Open Timo-Breumelhof opened 1 year ago

Timo-Breumelhof commented 1 year ago

I would like to add a "general forum link" to the template in the latest posts template. So a link to the forums page

Describe the solution you'd like

Add

[FORUMSPAGENAME] : renders the name of the page with the forums module

and

[FORUMSPAGEURL]: renders the url of the page with the forums module

image

Describe alternatives you've considered

None

WillStrohl commented 1 year ago

This sounds like a good enhancement to try and get into 8.0. What do you both think?

CC: @Timo-Breumelhof @johnhenley

johnhenley commented 1 year ago

Well...there is a wrinkle of course. If you have multiple instances of the forums module installed on different pages in your portal, you can combine the new posts in the what's new module ...

SO.....putting the requested [FORUMURL] link into the footer section is only valid if you have only one forums instance.

WillStrohl commented 1 year ago

Is the token currently getting replaced without context? If not, shouldn't the relevant CBO(s)/moduel(s) already have the correct URL for the [FORUMURL] at the time of replacement?

Timo-Breumelhof commented 1 year ago

@johnhenley Hmm, right. And we don't have a "Get threads from Forum x" in the module settings. Maybe we should park this for now, I'll hard code a link for now?

johnhenley commented 1 year ago

Is the token currently getting replaced without context? If not, shouldn't the relevant CBO(s)/moduel(s) already have the correct URL for the [FORUMURL] at the time of replacement?

@WillStrohl the [FORUMURL] token is replaced in the details template as each topic/post is handled. @Timo-Breumelhof is asking for a [FORUMSPAGEURL] token in the footer. Because you can pull from multiple instances of the forums module into a single "latest posts" module, there is no absolute context, so there could be multiple page links.

johnhenley commented 1 year ago

@johnhenley Hmm, right. And we don't have a "Get threads from Forum x" in the module settings.

@Timo-Breumelhof The "get threads from forum x" is in the checkbox/treeview above the template text boxes.

If you have multiple instances of the forum module it shows all of them and you can show a consolidated list of latest topics. This is actually a "feature" IMO since you could have a forums module for general Q&A and different ones for some social groups, and you want to mix them and show as "latest activity". In that scenario, having a single link -- which page would you link to? So your conclusion to hard code it is probably better. One other solution would be to have a setting that chooses one instance as the "main" one and base the link off of that.

WillStrohl commented 1 year ago

This sounds too complicated to get into 8.0. Do either of you disagree?

Timo-Breumelhof commented 1 year ago

Agreed. Maybe this could be a solution later? [FORUMSPAGEURL:0]