PrettyPixels Posted April 10, 2017 Share Posted April 10, 2017 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? Link to comment Share on other sites More sharing options...
Faqole Posted April 10, 2017 Share Posted April 10, 2017 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 More sharing options...
Adriano Faria Posted April 10, 2017 Share Posted April 10, 2017 9 hours ago, PrettyPixels said: Does anyone know how to accomplish this? It will require a custom widget to check if you're on a forum view and grab the ID and based on it, display or not the widget content. Link to comment Share on other sites More sharing options...
Apfelstrudel Posted April 10, 2017 Share Posted April 10, 2017 This is what I planned to do but the problem is that you can't disable the widget cache setting when creating a plugin-based widget otherwise user could see forum topics they are not allowed to see. Link to comment Share on other sites More sharing options...
Adriano Faria Posted April 10, 2017 Share Posted April 10, 2017 I've made something like this where I display other blog entries from same user. I used \IPS\Widget\PermissionCache. Link to comment Share on other sites More sharing options...
NAZMtnMan Posted April 26, 2017 Share Posted April 26, 2017 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 More sharing options...
clearvision Posted April 26, 2017 Share Posted April 26, 2017 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 More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.