kmk Posted January 30, 2020 Posted January 30, 2020 IPS widgets are already implemented, but could you add ability to show by app and by page? I try to place a gallery album widget inside of club, but it is visible in all clubs and forums pages. I would like have choices of Global, by apps, by pages, or only in specific club page...
annadaa Posted January 30, 2020 Posted January 30, 2020 it is true, the widjet should be displayed only in the precise page or we put them as it is the case already with certain widgets of the marketplace. it would be nice to fix that for 4.5. thanks
TDBF Posted January 30, 2020 Posted January 30, 2020 7 hours ago, kmk said: IPS widgets are already implemented, but could you add ability to show by app and by page? I try to place a gallery album widget inside of club, but it is visible in all clubs and forums pages. I would like have choices of Global, by apps, by pages, or only in specific club page... I have been asking for this for the past 5 years, so don't hold your breath. Due to the way that the blocks information are stored in the database, it makes it impossible to create a plugin to do what you or I want.
abdoulghani Posted January 30, 2020 Posted January 30, 2020 Just now, TDBF said: I have been asking for this for the past 5 years, so don't hold your breath. Due to the way that the blocks information are stored in the database, it makes it impossible to create a plugin to do what you or I want. I do not think that such a slight option is impossible. If you want a widget to be displayed only in a forum sub category because it only corresponds to this sub category or to a specific club, why display it on all forums?
Adriano Faria Posted January 30, 2020 Posted January 30, 2020 2 minutes ago, abdoulghani said: If you want a widget to be displayed only in a forum sub category because it only corresponds to this sub category or to a specific club, why display it on all forums? Because currently the widget is tied to the controller so Forum1, Forum200 or Club Forum C and Club Forum Z uses same controller, that’s why it shows same information in all “forums”. It seemed to start to change in 4.5. There are news regarding clubs: Clubs Widgets on
TDBF Posted January 30, 2020 Posted January 30, 2020 8 minutes ago, abdoulghani said: I do not think that such a slight option is impossible. If you want a widget to be displayed only in a forum sub category because it only corresponds to this sub category or to a specific club, why display it on all forums? Without a major refactor to the database block tables, or simply hacking the hell out of the code which will require pulling unnecessary table row information to display one block, then sure. 😉
Adriano Faria Posted January 30, 2020 Posted January 30, 2020 3 minutes ago, TDBF said: Without a major change database table, or simply hacking the hell out of the code which will require pulling unnecessary table row information to display one block, then sure. 😉 I don’t think it’s necessary. It’s enough to add a node field in the widget configuration and check if you’re in the forum controller then check the request ID of the forum and display the widget output if it’s a match.
TDBF Posted January 30, 2020 Posted January 30, 2020 20 minutes ago, Adriano Faria said: I don’t think it’s necessary. It’s enough to add a node field in the widget configuration and check the request ID of the forum and display the widget output if it’s a match. It is, as the block information is stored in two different database tables, cms_page_widget_areas and core_widget_areas, and the block content for each page is stored table field which corresponds to the for app, module and controller. In the case of pages, all the block information is stored in field area_widget which means it is global for pages database. That means, if you place a block in the database index, it will be shown in the database category and page. If I want to pull out just one block for the Category page, it means I have to pull out all that information from area_widgets for all blocks for that Database and process them all. It is just not very efficient way and is resource hungry IMO. It also means that you have to take process this information every-time you want to update or save a block.
Adriano Faria Posted January 30, 2020 Posted January 30, 2020 If you check the controller and the request ID on the render() and if you’re not in the “right” place, no output is generated so no resource is used. This is already used by IPS in announcements. You are over complicating things. Anyway, it’s already doable.
TDBF Posted January 30, 2020 Posted January 30, 2020 55 minutes ago, Adriano Faria said: If you check the controller and the request ID on the render() and if you’re not in the “right” place, no output is generated so no resource is used. This is already used by IPS in announcements. You are over complicating things. Anyway, it’s already doable. Then I don't think we are talking about the same thing.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.