Jump to content

Featured Replies

Posted

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"

  • 3 months later...
  • Author
On 10/22/2017 at 4:31 PM, Matt said:

I like this idea.

Any chance we get this implemented in 4.3?

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

 

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

  • 3 months later...
  • 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.

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

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

 

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!

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.

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 🙂 

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

@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

  • 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;
}

 

  • 2 months later...
  • Author

Would be nice to add this for 4.5. There is no way I see to control page elements individually between forum views.

  • 1 month later...
  • 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..

image.png.3109cda9dd70deca401af6f7ca75db2b.png

  • 1 year later...
  • 9 months later...
  • Author

Just revisiting as a suggestion to be able to target page elements per forum view....

  • 1 month later...
  • Author

There could be so many css element designs tailored to each view, hiding content, etc...missed opportunity IMHO.

  • 1 year later...
  • Author

Anyone figure out a workaround? Suggestion fell on deaf ears I guess...or lack of interest.

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"

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

 

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

  • No registered users viewing this page.