Support ⇒ Designer Dragonfly v10 ⇒ Hidden mobile blocks ⇒ Community Forums ⇒ CPG Dragonfly™ CMS
Forum IndexDesigner Dragonfly v10

Hidden mobile blocks Reply to topic


I think that a good improvement can be a option in block configuration for hidden that block for mobile. It can be placed in edit page or install a new block.

In mobile devices you can not put the same information than in desktop.

If you need help with this, we can help you.

Aforo - Google Earth - WebNaranja - DFcms.es

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):
Centos 5/Apache 2.2.3/MySQL:5.0.45/PHP:5.2.10 /9.2

Last edited by Aforo on Tue Jun 19, 2018 4:56 pm; edited 1 time in total


@media only screen and (max-width: 800px) { #RightSide { display: none; } }
Or any other you use or want to design Wink

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):
Fedora 25 / Apache 2.4.27 / MariaDB 10.1.26 / PHP 7.1.10 / Mercurial


Thanks for your answer.

I'm talking in admin configuration of each block: one option for hidden that block or not in mobile devices chosen by administrator of the site.
The same for column of blocks...

Aforo - Google Earth - WebNaranja - DFcms.es

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):
Centos 5/Apache 2.2.3/MySQL:5.0.45/PHP:5.2.10 /9.2

Last edited by Aforo on Thu Jun 21, 2018 5:46 pm; edited 1 time in total


I understand you but that feature is not there. It's bad to do mobile detection for several reasons.
Screen size detection in CSS is much better.

I know we still have a problem with the current Menu in the default theme.
Nano added Mobile detection to get some things working due to "touch" behavior of certain phones/browsers.
But the menu is not responsive when making the browser window small on a non-mobile device, which still makes it hard to use.

A good example is a Tablet/Phablet device with large screen (1024+ pixels) in landscape position Smile

Another way could be that we add support for sub-domain themes, like:
- example.com = theme
- m.example.com = mobile theme

You can already solve this in the /themes/name/theme.php
function themeheader() { $OUT = \Dragonfly::getKernel()->OUT; if (\Poodle\UserAgent::isTablet() || \Poodle\UserAgent::isMobile()) { $OUT->tpl_header = 'mobile_header'; $OUT->tpl_footer = 'mobile_footer'; } else { $OUT->tpl_header = 'header'; $OUT->tpl_footer = 'footer'; }
There is no blocks render overhead when you don't show the blocks, because v10 renders blocks on the fly.

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):
Fedora 25 / Apache 2.4.27 / MariaDB 10.1.26 / PHP 7.1.10 / Mercurial

Last edited by DJ Maze on Fri Jun 22, 2018 10:58 am; edited 6 times in total


But if there were an option to add a css name (eg #blockscssname) then you could select device via CSS, eg. @media only screen and (max-width: 800px) { #blockscssname {display: none}}

Raised way back as dragonflycms.org/Projects/f=137/

Ironically spent part of this morning adding the feature to a v9 installation. Yes you can do it using #pe0001 etc, instead, but a pain in bs if you have a test site as well as the production site (because the block numbers are always going to be different).

Pro_News CM™ - Content Management for Dragonfly CMS™

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):
Linux / 1.3.39 - 2.4.9 / 5.5.42 - 5.6.16 / 5.4.37 - 5.5.11 / 9.4


layingback wrote
But if there were an option to add a css name (eg #blockscssname) then you could select device via CSS, eg. @media only screen and (max-width: 800px) { #blockscssname {display: none}}

Ah there we go, i will look into it. Would be easy.

Found it: you can use 'toggleid'
It is the block title like: WhoisWhere
However this will have issues for use in CSS as the toggleid can be "You:?*Foo"
So i added a 'cssid' which replaces all with underscores: "Who_is_Where" and "You___Foo".

Problem: changing the block title has effect as the CSS is not triggered
Same issue when we add a 'blockscssname' input in the blocks admin Wink

bitbucket.org/dragonfl...73f282d03b
and
bitbucket.org/dragonfl...8a8f88bf7c

Note: this second commit also contains a replacement of <marquee>

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):
Fedora 25 / Apache 2.4.27 / MariaDB 10.1.26 / PHP 7.1.10 / Mercurial

Last edited by DJ Maze on Sat Jun 23, 2018 11:45 am; edited 7 times in total


Thanks.
Not exactly that.

Perhaps I'dint explain very well.
Example:
?admin&op=blocks&edit=5
One admin option for don't show that block in mobile devices (small screen).
One new css class for blocks that must not show in mobiles.

Of this way, "normal" blocks has a class like now, but "hidden in mobile" blocks has another class that can be show in desktop, but not in small screens (for example less than 550 pixels).

@media (max-width: 639px) { .hidden-768 { display: none; } .show-768 { display:block; } #header-search #header_search_field { width:60px; } }

It's a option that not depend so much if device is mobile as the screen is small.

As I see the problem:
- We need add to the css a class for mobile blocks.
- We need evaluate the block as "normal" or "hidden in mobile" (in the function/objet) that analyze the block
- we need add a option in admin-blocks for hidden in mobile (a checkbox or similar)
- we need add in database a new field "hidden in mobile" for each block.

Can be interesting?
I think that yes because today mobile traffic is the most of our traffic.

Aforo - Google Earth - WebNaranja - DFcms.es

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):
Centos 5/Apache 2.2.3/MySQL:5.0.45/PHP:5.2.10 /9.2

Last edited by Aforo on Wed Jul 18, 2018 5:35 pm; edited 2 times in total

All times are UTC


Jump to: