Invision Community 4: SEO, prepare for v5 and dormant account notifications Matt November 11, 2024Nov 11
Posted October 20, 20177 yr 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"
February 9, 20186 yr Author On 10/22/2017 at 4:31 PM, Matt said: I like this idea. Any chance we get this implemented in 4.3?
March 20, 20186 yr Author 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'>
July 22, 20186 yr Author @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.
November 2, 20186 yr Author 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.
March 5, 20195 yr 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!
March 5, 20195 yr Author 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!
March 5, 20195 yr 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!
March 6, 20195 yr 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.
March 6, 20195 yr 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 🙂
March 7, 20195 yr 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!!
October 23, 20195 yr @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, 20195 yr by Maxxius
October 25, 20195 yr Author 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; }
January 10, 20205 yr Author Would be nice to add this for 4.5. There is no way I see to control page elements individually between forum views.
February 16, 20204 yr Author 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..
March 18, 20213 yr Author I'd like to re-suggest this as its relatively impossible to my knowledge, to target css elements per forum view currently.
December 18, 20213 yr Author Just revisiting as a suggestion to be able to target page elements per forum view....
February 6, 20222 yr Author There could be so many css element designs tailored to each view, hiding content, etc...missed opportunity IMHO.
April 22, 20231 yr Author Anyone figure out a workaround? Suggestion fell on deaf ears I guess...or lack of interest.
April 24, 20231 yr 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"
April 24, 20231 yr Author 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.
April 24, 20231 yr 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, 20231 yr by Nathan Explosion