Managing a mobile and main site with Concrete5
Permalink
Hello everyone,
I am working with a client and I have a site already created using Concrete5 and it is live. We are working to develop a mobile version of their content because not everything needs to be available on the mobile version. I am just trying to figure out the best method to attack this problem.
Option one could be make a sub domain and use a more mobile friendly theme. The problem with this method is if the client adds a new content or post to the main site the changes won't be reflected in the mobile. Is there a way for this to happen?
Option two could be make a bunch of pages within the site that have the same content blocks set up and skin it with the mobile friendly theme, but again the problem becomes what happens when the client adds new content? I know blocks like; page list can look at other pages but is this really the best way?
I am I just spinning my wheels and is there a much simpler way? I will defer to your greater experience in Concrete5. Thank you everyone for at least looking and I appreciate any help.
I am working with a client and I have a site already created using Concrete5 and it is live. We are working to develop a mobile version of their content because not everything needs to be available on the mobile version. I am just trying to figure out the best method to attack this problem.
Option one could be make a sub domain and use a more mobile friendly theme. The problem with this method is if the client adds a new content or post to the main site the changes won't be reflected in the mobile. Is there a way for this to happen?
Option two could be make a bunch of pages within the site that have the same content blocks set up and skin it with the mobile friendly theme, but again the problem becomes what happens when the client adds new content? I know blocks like; page list can look at other pages but is this really the best way?
I am I just spinning my wheels and is there a much simpler way? I will defer to your greater experience in Concrete5. Thank you everyone for at least looking and I appreciate any help.
Thanks looking into this.
The developer before me was learning Concrete5 as he went and made changes to some of the php files which makes other themes tweek out when I switch between them. This is going to be a tough one to crack.
I am thinking a sub-domain that is a clean install and migrate the content over might be the best plan due to the odd php scripting. Are you aware of a way to allow the composer to post to more than one page? Such as allowing the same post to be placed under mobile.####.com andhttp://www.####.com?
Thanks again.
The developer before me was learning Concrete5 as he went and made changes to some of the php files which makes other themes tweek out when I switch between them. This is going to be a tough one to crack.
I am thinking a sub-domain that is a clean install and migrate the content over might be the best plan due to the odd php scripting. Are you aware of a way to allow the composer to post to more than one page? Such as allowing the same post to be placed under mobile.####.com andhttp://www.####.com?
Thanks again.
Hello,
There is a constant that is set if you have a mobile theme set and a mobile theme selected.
If you have the same theme for both you can explicitly set it as the mobile theme as well and this constant will continue to work.
You can also do this
That will return true for mobile detection regardless of the theme settings.
It's not uncommon for developers(especially a year or so ago) to use one of these techniques to determine which Areas to display.
Regards,
Mike
http://mkly.io
There is a constant that is set if you have a mobile theme set and a mobile theme selected.
// Means concrete5 has detected a mobile // and there is one selected if (MOBILE_THEME_IS_ACTIVE) { }
If you have the same theme for both you can explicitly set it as the mobile theme as well and this constant will continue to work.
You can also do this
$md = new Mobile_Detect(); if ($md->isMobile()) { }
That will return true for mobile detection regardless of the theme settings.
It's not uncommon for developers(especially a year or so ago) to use one of these techniques to determine which Areas to display.
Regards,
Mike
http://mkly.io
Hi mkly,
My reasoning for taking a different approach to this is in what seems to be a completely new effort as I haven't seen much on this yet. The initial idea that brought me to this point was being able to force a non responsive theme for tablets so as to keep sidebars intact
I have the mobile_detect library down pat, and I've created a piece of code that will set theme depending on whether the device is mobile, tablet, or regular browser, which i'm including above the head in my elements/header.php for both themes indicated:
unfortunately all this accomplishes at the moment, is physically setting the theme for the page. If the theme is set using a regular browser, viewing the page via mobile will first show the regular browser theme and the mobile theme then on refresh and vice versa. This is definately NOT at all optimal to begin with!
I was just looking at:
http://www.concrete5.org/documentation/how-tos/designers/tutorial-b...
in hopes of altering it to use the mobile_detect library as opposed to the themeswitcher...
My reasoning for taking a different approach to this is in what seems to be a completely new effort as I haven't seen much on this yet. The initial idea that brought me to this point was being able to force a non responsive theme for tablets so as to keep sidebars intact
I have the mobile_detect library down pat, and I've created a piece of code that will set theme depending on whether the device is mobile, tablet, or regular browser, which i'm including above the head in my elements/header.php for both themes indicated:
<?php Loader::library('3rdparty/mobile_detect'); $page = Page::getCurrentPage(); $detect = new mobile_detect(); if($detect->isMobile() == true) { if ($detect->isTablet() == true) { echo t('Tablet'); $page->setTheme(PageTheme::getByHandle('enlil_transparency')); ?> <?php } else { echo t('Mobile'); $page->setTheme(PageTheme::getByHandle('enlil_transparency')); ?> <?php } } else { echo t('Browser'); $page->setTheme(PageTheme::getByHandle('enlil_transparent_mobile')); ?> <?php } ?>
unfortunately all this accomplishes at the moment, is physically setting the theme for the page. If the theme is set using a regular browser, viewing the page via mobile will first show the regular browser theme and the mobile theme then on refresh and vice versa. This is definately NOT at all optimal to begin with!
I was just looking at:
http://www.concrete5.org/documentation/how-tos/designers/tutorial-b...
in hopes of altering it to use the mobile_detect library as opposed to the themeswitcher...
> The initial idea that brought me to this point was being able to force
> a non responsive theme for tablets so as to keep sidebars intact
Perhaps I'm not understanding the issue, but that seems to imply that you can't force sidebars to display on a tablet using a responsive design. Is that correct?
-Steve
> a non responsive theme for tablets so as to keep sidebars intact
Perhaps I'm not understanding the issue, but that seems to imply that you can't force sidebars to display on a tablet using a responsive design. Is that correct?
-Steve
yes, what I want to do is force tablets to display sidebars using a responsive theme.(flex 1200) I would like mobile to display responsively, but want tablet to display the sidebars rather than scoot them to the top or bottom of the content! If there is an easier way, please, throw some ibuprofen in my coffee :D
> I would like mobile to display responsively, but want tablet to
> display the sidebars rather than scoot them to the top or bottom
> of the content!
I guess I don't understand why this can't be done with media queries. You can set the breakpoints to whatever you want them to be.
:-/
-Steve
> display the sidebars rather than scoot them to the top or bottom
> of the content!
I guess I don't understand why this can't be done with media queries. You can set the breakpoints to whatever you want them to be.
:-/
-Steve
Sure, it can be dug into and made to work, but i guess I'm more into this as I believe there should be some kind of way to choose a theme for tablets, rather than just the mobile option provided in the core.
Creating that is what I'm after here...
Creating that is what I'm after here...
If you get too specific, your site will not recognize a new device. I have several old sites that have old analytics on them that have no idea how to identify anything past IE7.
http://detectmobilebrowsers.com/...
http://detectmobilebrowsers.com/...
I don't think there would be much of an issue in that aspect Mhawke, as I'm using the basic functionality of the mobile_detect library from the core. Nothing device specific and would benefit from core updates.
> Option one could be make a sub domain and use a more mobile friendly theme.
> [...]
> Option two could be make a bunch of pages within the site that have the same
> content blocks set up and skin it with the mobile friendly theme
Personally, I'd go with option 3: re-architect the site using a mobile-first responsive approach. Anything else seems like it would become a maintenance headache. It's not going to get easier as time goes on. A mobile-first front-end responsive framework like Bootstrap 3 will allow you use a single theme and support any screen size in a device-independent manner well into the future.
If you're not familiar with "mobile-first", it's worth looking into. It's not just a feature of some front-end frameworks; it's a design philosophy - an approach to building websites. Not all so-called "responsive" frameworks are mobile-first.
Here's a good compilation of relevant resources...
http://bradfrost.github.io/this-is-responsive/resources.html...
-Steve
> [...]
> Option two could be make a bunch of pages within the site that have the same
> content blocks set up and skin it with the mobile friendly theme
Personally, I'd go with option 3: re-architect the site using a mobile-first responsive approach. Anything else seems like it would become a maintenance headache. It's not going to get easier as time goes on. A mobile-first front-end responsive framework like Bootstrap 3 will allow you use a single theme and support any screen size in a device-independent manner well into the future.
If you're not familiar with "mobile-first", it's worth looking into. It's not just a feature of some front-end frameworks; it's a design philosophy - an approach to building websites. Not all so-called "responsive" frameworks are mobile-first.
Here's a good compilation of relevant resources...
http://bradfrost.github.io/this-is-responsive/resources.html...
-Steve
1. Redirect to mobile theme for mobile devices on page view and vice versa,
2. Hide "areas" in the mobile theme you dont want displayed to mobile browsers.
It's a ton to get into here! I believe i should just create a how-to for this. As soon as it is ready I will leave a link here ;)