Jump to content

Recommended Posts

Posted

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.

Posted

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. 

Posted (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.   

Could contain: Page, Text

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 by Randy Calvert
Posted
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. 

Posted

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.

Posted
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. 

Posted

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

Posted

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.

Posted

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

Posted
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. 

Posted

@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}}

 

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...