Jump to content

Recommended Posts

  • 3 months later...
  • 1 month later...
Posted
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'>

 

  • 4 months later...
  • 3 months later...
Posted

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.

  • 4 months later...
Posted
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!

Posted
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!

Posted
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.

Posted
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 🙂 

Posted
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!!

  • 7 months later...
Posted (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 by Maxxius
Posted
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;
}

 

  • 2 months later...
  • 1 month later...
Posted

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..

image.png.3109cda9dd70deca401af6f7ca75db2b.png

  • 1 year later...
  • 9 months later...
  • 1 month later...
  • 1 year later...
Posted
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"

Posted (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 by Nathan Explosion
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...