Jump to content

Sidebar blocks / widgets


PrettyPixels

Recommended Posts

9 hours ago, PrettyPixels said:

Is there a way to choose when sidebar blocks are displayed? For instance, let's say I want a specific sidebar block to show in forum-x and in my articles database, but not in forum-y. Does anyone know how to accomplish this?

A.f.a.i.k. this can not be accomplished with the current sidebar. It will require custom developement.

Link to comment
Share on other sites

  • 3 weeks later...

Can anyone point me in the right direction to accomplish this if I'm not a developer? I need the calendar widget to be unique to each sub forum, but when using the block manager it makes it change for all sub forums. Announcements have a setting to display in chosen forums, calendars do not. 

How can I find a developer that knows how to do this??

Link to comment
Share on other sites

7 hours ago, NAZMtnMan said:

Can anyone point me in the right direction to accomplish this if I'm not a developer? I need the calendar widget to be unique to each sub forum, but when using the block manager it makes it change for all sub forums. Announcements have a setting to display in chosen forums, calendars do not. 

How can I find a developer that knows how to do this??

If you have Content Management (pages) and can handle a bit of php this works:

$forum_id = 0;
if (\IPS\Request::i()->controller == "forums") {
	$forum_id = \IPS\Request::i()->id;
}

if (\IPS\Request::i()->controller == "topic") {
	$topic_id = \IPS\Request::i()->id;
	$topic = \IPS\forums\Topic::loadAndCheckPerms($topic_id);
	$forum_id = $topic->forum_id;
}
if ($forum_id == 35) {
print \IPS\cms\Blocks\Block::display('feed_template_key');
}

You put that in a custom php block and then need to create a plugin calendar feed block (simple fill in the options no coding) and use its template key in above.  Above only works on forum/topic pages.

I got the forum detection code from here:

 

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

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