Show Widgets by category
-
This post is deleted!
-
Maybe this can help someone:
You can also use jquery:
This would go into the HTML widget:
<span class="offtopic_forbidden">Off-topic is strictly forbidden.</span> <script> if (ajaxify.currentPage != 'category/14/staff-recruitment') { $('.offtopic_forbidden').hide() } </script>
And this would be the container:
<div class="alert ui-draggable-handle alert-danger offtopic_forbidden">{{body}}</div>
Adjust 'category/14/staff-recruitment' to your needs.
-
$('.offtopic_forbidden')
is a jquery selector, it selects the DOM element with the class .offtopic_forbidden -
The function .hide() hides it.
Additional info:
-
You can use another type of container, but be sure to add the class to it.
-
You can also rename
offtopic_forbidden
to your needs.
-
-
@julian have you added this feature on the ACP widgets page?
We want each category to have its own dedicated widget, we will put a short description on top of each widget to explain what each category is about. Please let me know its very imp for us.
-
@faizanzahid This has been available for some time now.
-
@baris is it possible to add a widget that is topic specific?
I want certain announcements to show up in each page of a topic (either at the top of the page or at the bottom). It is not category or sub-category specific announcement, rather it is topic specific...
would it be possible to implement such widget? (If it is, I can make a github issue)
(edit: Currently, I add topic related announcements as post to the topic... However, if topic has 30-40 pages, it is just disappearing after certain time, I am trying to solve this problem)