AlexWebsites Posted October 20, 2017 Posted October 20, 2017 Please add a forum index data-pagecontroller="" for each view; traditional, fluid, etc. This way we can target elements on the page with CSS specific to that view. Currently all views are data-pagecontroller="index" All Astronauts, BomAle, Cyboman and 1 other 4
Management Matt Posted October 22, 2017 Management Posted October 22, 2017 I like this idea. AlexWebsites, Rhett and SeNioR- 2 1
AlexWebsites Posted February 9, 2018 Author Posted February 9, 2018 On 10/22/2017 at 4:31 PM, Matt said: I like this idea. Any chance we get this implemented in 4.3?
AlexWebsites Posted March 20, 2018 Author Posted March 20, 2018 On 2/9/2018 at 5:13 PM, AlexWebsites said: Any chance we get this implemented in 4.3? Sadly, looks like it didn't make the cut...? 4.3 still uses the same for all views on forum index from what I can tell... <body class='ipsApp ipsApp_front ipsCommunity sWide ipsJS_has ipsClearfix' data-controller='core.front.core.app' data-message="" data-pageApp='forums' data-pageLocation='front' data-pageModule='forums' data-pageController='index'>
AlexWebsites Posted July 22, 2018 Author Posted July 22, 2018 @Matt anymore thought to this on if it can be added or not? Would be nice to hide sidebar elements in fluid forum view for instance, that stretch out the page but are needed in traditional view. crmarks and Yamamura 1 1
AlexWebsites Posted November 2, 2018 Author Posted November 2, 2018 Still would love to see something like this implemented to offer more styling control. When my users have fluid view on I'd like to be able to target and remove some blocks and such with custom css but not have it affect traditional view. Unfortunately all views are the same controllers.
marina_ls Posted March 5, 2019 Posted March 5, 2019 On 11/2/2018 at 1:52 PM, AlexWebsites said: Still would love to see something like this implemented to offer more styling control. When my users have fluid view on I'd like to be able to target and remove some blocks and such with custom css but not have it affect traditional view. Unfortunately all views are the same controllers. Hello Could you play say me how can I target index with CSS? I don't know how to target these "data-pagemodule or data-pagecontroller... Thanks!
AlexWebsites Posted March 5, 2019 Author Posted March 5, 2019 2 minutes ago, marina_ls said: Hello Could you play say me how can I target index with CSS? I don't know how to target these "data-pagemodule or data-pagecontroller... Thanks! marina_ls 1
marina_ls Posted March 5, 2019 Posted March 5, 2019 3 minutes ago, AlexWebsites said: Yes, I was just looking at that. Thanks. Trying to target it now using: body[data-pageapp="forums"][data-pagemodule="forums"][data-pagecontroller="index"] .ipsApp_front .ipsBreadcrumb { display: none !important; } But not having any effect... Am I doing something wrong? Thanks!
ahc Posted March 6, 2019 Posted March 6, 2019 4 hours ago, marina_ls said: Yes, I was just looking at that. Thanks. Trying to target it now using: But not having any effect... Am I doing something wrong? Thanks! body[data-pagemodule="forums"][data-pagecontroller="index"] .ipsBreadcrumb { display: none; } You shouldn't need !important unless you're using the same selector elsewhere that overrides it.
Rikki Posted March 6, 2019 Posted March 6, 2019 5 hours ago, marina_ls said: Yes, I was just looking at that. Thanks. Trying to target it now using: body[data-pageapp="forums"][data-pagemodule="forums"][data-pagecontroller="index"] .ipsApp_front .ipsBreadcrumb { display: none !important; } But not having any effect... Am I doing something wrong? Thanks! .ipsApp_front is also a class on the body element, so you need to remove the space (I've also moved that class to the front of the selector for clarity): body.ipsApp_front[data-pageapp="forums"][data-pagemodule="forums"][data-pagecontroller="index"] .ipsBreadcrumb { display: none !important; } An alternative way is using the data-pagelocation attribute in the same way you've used the others, since that tells you whether it's 'front' or 'admin': body[data-pagelocation="front"][data-pageapp="forums"][data-pagemodule="forums"][data-pagecontroller="index"] .ipsBreadcrumb { display: none !important; } Either of those approaches should work 🙂 marina_ls, Cyboman, Meddysong and 3 others 6
marina_ls Posted March 7, 2019 Posted March 7, 2019 19 hours ago, Rikki said: .ipsApp_front is also a class on the body element, so you need to remove the space (I've also moved that class to the front of the selector for clarity): body.ipsApp_front[data-pageapp="forums"][data-pagemodule="forums"][data-pagecontroller="index"] .ipsBreadcrumb { display: none !important; } An alternative way is using the data-pagelocation attribute in the same way you've used the others, since that tells you whether it's 'front' or 'admin': body[data-pagelocation="front"][data-pageapp="forums"][data-pagemodule="forums"][data-pagecontroller="index"] .ipsBreadcrumb { display: none !important; } Either of those approaches should work 🙂 It worked perfectly. Thank you very much!!
Maxxius Posted October 23, 2019 Posted October 23, 2019 (edited) @AlexWebsites @Rikki How would I target like this [data-pagelocation="front"][data-pageapp="forums"][data-pagemodule="forums"][data-pagecontroller="index"] but for downloads app, file description text? Thanks 🙂 Edited October 23, 2019 by Maxxius
AlexWebsites Posted October 25, 2019 Author Posted October 25, 2019 On 10/23/2019 at 11:18 AM, Maxxius said: @AlexWebsites @Rikki How would I target like this [data-pagelocation="front"][data-pageapp="forums"][data-pagemodule="forums"][data-pagecontroller="index"] but for downloads app, file description text? Thanks 🙂 Try something like: body[data-pagelocation="front"][data-pageapp="downloads"][data-pagemodule="downloads"][data-pagecontroller="view"] .ipsType_richText > p:last-child { font-weight: bold; font-size: larger; } Maxxius 1
AlexWebsites Posted January 10, 2020 Author Posted January 10, 2020 Would be nice to add this for 4.5. There is no way I see to control page elements individually between forum views.
AlexWebsites Posted February 16, 2020 Author Posted February 16, 2020 Aside from adding a separate class for each forum view, the ability to limit blocks from showing on certain view would be helpful. Maybe a block setting under show all devices? Something like, show in all forum views or fluid, traditional, category.. Yamamura 1
AlexWebsites Posted March 18, 2021 Author Posted March 18, 2021 I'd like to re-suggest this as its relatively impossible to my knowledge, to target css elements per forum view currently. Meddysong, IP-Gamers, Maxxius and 1 other 2 2
AlexWebsites Posted December 18, 2021 Author Posted December 18, 2021 Just revisiting as a suggestion to be able to target page elements per forum view.... SeNioR- 1
Maxxius Posted December 19, 2021 Posted December 19, 2021 Me also supporting this idea 🙂 AlexWebsites and SeNioR- 2
AlexWebsites Posted February 6, 2022 Author Posted February 6, 2022 There could be so many css element designs tailored to each view, hiding content, etc...missed opportunity IMHO. Askancy and AlexJ 2
AlexWebsites Posted April 22, 2023 Author Posted April 22, 2023 Anyone figure out a workaround? Suggestion fell on deaf ears I guess...or lack of interest. G17 Media 1
Marc Posted April 24, 2023 Posted April 24, 2023 On 4/22/2023 at 9:24 PM, AlexWebsites said: Anyone figure out a workaround? Suggestion fell on deaf ears I guess...or lack of interest. It should be noted, that suggestions will not always make the final product, and some that do, it may be years before they are implemented die to what is involved in them. It doesn't necessarily mean they have "fell on deaf ears" AlexWebsites 1
AlexWebsites Posted April 24, 2023 Author Posted April 24, 2023 LOL...I first suggested this in 2017 so are you saying there's still a chance? I was just looking to see if anyone found an alternative solution over the years.
Nathan Explosion Posted April 24, 2023 Posted April 24, 2023 (edited) Edit your globalTemplate and after the final {{endif}} but before the closing > on the BODY line: <body class='ipsApp ipsApp_front {{if isset( \IPS\Request::i()->cookie['hasJS'] )}}ipsJS_has{{else}}ipsJS_none{{endif}} ipsClearfix{{foreach output.bodyClasses as $class}} {$class}{{endforeach}}' {{if output.globalControllers}}data-controller='{expression="implode( ',', output.globalControllers )"}'{{endif}} {{if isset( output.inlineMessage )}}data-message="{expression="output.inlineMessage"}"{{endif}} data-pageApp='{$location['app']}' data-pageLocation='front' data-pageModule='{$location['module']}' data-pageController='{$location['controller']}' {{if isset( \IPS\Request::i()->id )}}data-pageID='{expression="(int) \IPS\Request::i()->id"}'{{endif}} {{if isset( \IPS\Dispatcher::i()->dispatcherController ) AND !\IPS\Dispatcher::i()->dispatcherController->isContentPage }}data-nocontent{{endif}} {{if output.pageName}}data-pageName="{expression="output.pageName"}"{{endif}}> Add the following (space at start, important) {{if ISSET(\IPS\Request::i()->cookie["forum_view"])}}data-forumView='{expression="\IPS\Request::i()->cookie['forum_view']"}'{{endif}} You now have an additional selector you can use called "data-forumView" which will contain either table, list or fluid <body class='ipsApp ipsApp_front {{if isset( \IPS\Request::i()->cookie['hasJS'] )}}ipsJS_has{{else}}ipsJS_none{{endif}} ipsClearfix{{foreach output.bodyClasses as $class}} {$class}{{endforeach}}' {{if output.globalControllers}}data-controller='{expression="implode( ',', output.globalControllers )"}'{{endif}} {{if isset( output.inlineMessage )}}data-message="{expression="output.inlineMessage"}"{{endif}} data-pageApp='{$location['app']}' data-pageLocation='front' data-pageModule='{$location['module']}' data-pageController='{$location['controller']}' {{if isset( \IPS\Request::i()->id )}}data-pageID='{expression="(int) \IPS\Request::i()->id"}'{{endif}} {{if isset( \IPS\Dispatcher::i()->dispatcherController ) AND !\IPS\Dispatcher::i()->dispatcherController->isContentPage }}data-nocontent{{endif}} {{if output.pageName}}data-pageName="{expression="output.pageName"}"{{endif}} {{if ISSET(\IPS\Request::i()->cookie["forum_view"])}}data-forumView='{expression="\IPS\Request::i()->cookie['forum_view']"}'{{endif}}> Edited April 24, 2023 by Nathan Explosion AlexWebsites 1
Recommended Posts