Invision Community 4: SEO, prepare for v5 and dormant account notifications By Matt Monday at 02:04 PM
virap1 Posted March 4, 2023 Posted March 4, 2023 I am trying to setup the website in a way that related content from database entries are shows in forums, topics and the other way around. So, let's say there is a forum called Marriage and then an articles database which has a category of Marriage. How I would display marriage articles within marriage topics? Thank you.
Randy Calvert Posted March 4, 2023 Posted March 4, 2023 The Pages application only allows you to associate one forum per database. This means you cannot have one forum for each category within a single database. Instead you would have to create multiple databases instead of multiple categories within a forum.
virap1 Posted March 4, 2023 Author Posted March 4, 2023 Randy, the forums are separate, not part of the database.
Randy Calvert Posted March 4, 2023 Posted March 4, 2023 (edited) What I'm referring to is within Pages, you can have information posted in a database synced to a forum. However you can only do that at the database level... not within specific forums within a database. In the example below, if an entry is created in the database, a topic is created within the specified forum that shows each field you allow to be displayed. But again... this is only able to be specified at the database level. That means if you have multiple categories, they would ALL post into that forum. Edited March 4, 2023 by Randy Calvert
virap1 Posted March 4, 2023 Author Posted March 4, 2023 Thank you Randy. In my setup the forums are separate and not within the db.
opentype Posted March 5, 2023 Posted March 5, 2023 9 hours ago, virap1 said: How I would display marriage articles within marriage topics? You can’t. You could however create “landing pages“ for each topic, where you add feed blocks from the separate areas. So you could have “lastest marriage articles”, “latest marriage forum topics” and things like that together. And from there people could click through to get to Pages or the Forums.
Marc Posted March 6, 2023 Posted March 6, 2023 As mentioned above, there isnt really a way to do what you want to do there. You could do what opentype suggested, or maybe even use tagging, then use similar content blocks perhaps.
virap1 Posted March 6, 2023 Author Posted March 6, 2023 Thank you @opentype, @Marc Stridgen. So the method described here would not achieve this? This is an older guide and the code does not work, but appears to be describing exactly what I want to do.
opentype Posted March 6, 2023 Posted March 6, 2023 1 hour ago, virap1 said: So the method described here would not achieve this? When I say you can’t do it, then I am referring to native functionalities. With custom coding, almost anything is possible.
virap1 Posted March 6, 2023 Author Posted March 6, 2023 Is there a way to modify that guides code so it works with the current version of invision? Thanks.
Marc Posted March 6, 2023 Posted March 6, 2023 Im not sure how that actually achieves what you are looking for here. The code shown there will allow you to show blocks only in certain forums, which doesnt appear to be what you asked for
virap1 Posted March 6, 2023 Author Posted March 6, 2023 By showing separate code for certain forums I could set up a block for each forum which will pull the records from the corresponding databases and show them within forum topics. So the marriage plugin will display marriage database records in marriage forum etc.
Marc Posted March 6, 2023 Posted March 6, 2023 I will move your topic to our developer connection forum, which is better placed for you on this, as it needs coding to achieve, as you have seen. I will add the guide there on our list of things to take a look at
opentype Posted March 6, 2023 Posted March 6, 2023 4 hours ago, virap1 said: Is there a way to modify that guides code so it works with the current version of invision? Thanks. I would expect the code to still be correct. You might have made a mistake while setting it up. If not, I would start by outputting all the variables from the wrapper block to see if they are populated as expected.
virap1 Posted March 14, 2023 Author Posted March 14, 2023 @opentype thank you. You were correct, the syntax in the guide still works and I was implementing it in a wrong way. The problem I have now is that the ID variable is the topic id, how can I change it so I get the forum id instead. so the $id here {block="article_{$id}"} should be the forum id. {{if request.app == 'forums' && request.module == 'forums'}} {{$id = \IPS\Request::i()->id;}} {block="article_{$id}"} {{endif}}
Recommended Posts