Need extra help with your Joomla site? Consider paid Joomla support by the developer of Chameleon and MetaMod.
- Index
- » MetaMod
- » MetaMod General Support
- » What about screen width?
What about screen width?
What about screen width?
Hi:
First, thank you for your nice extension. I have a problem with a module that does not changes size according to window width. So I have to try to find a solution and maybe metamod is the solution. Is there any way to get the screen/window size in a variable to show or not a module?
Re: What about screen width?
Hi Yadox,
I think that's quite difficult to achieve - maybe someone else has some more ideas than I have, but I'll describe why it's very hard to do:
* MetaMod works at the time that the page is requested (i.e. when someone clicks on the link to the page).
* The web browser sends the URL request,
* The URL request does not include information about screen size.
* So MetaMod has no information to work on, regarding what the screen size is.
There are some javascript scripts out there that are able to calculate screen size and send a request back to the web server including that information. But, by the time the server gets this secondary request it's too late to make use of the information, as the page is already sent.
The only way that this could work would be for the entire page to refresh once the Javascript script calculated the size. However, that's pretty horrible.
If anyone else has a better idea I'd love to hear it...
Cheers,
Stephen
Re: What about screen width?
Actually I do have another idea... and this doesn't have to involve MetaMod... I wonder if your module can be dynamically resized with Javascript? i.e. most template include Mootools (or sometimes jQuery). So you could attach some JS to the page which detects dynamic page resizing, and adjusts the width of the container (div or table or whatever) that the module is in.
You might need to find a JS/CSS expert to help with this :-)
- Index
- » MetaMod
- » MetaMod General Support
- » What about screen width?
Board Info
- Board Stats:
- Total Topics:
- 1700
- Total Polls:
- 6
- Total Posts:
- 5967
- Posts this week:
- 3
- User Info:
- Total Users:
- 8056
- Newest User:
- no21an
- Members Online:
- 0
- Guests Online:
- 222
- Online:
- There are no members online
Forum Legend:
Topic
New
Locked
Sticky
Active
New/Active
New/Locked
New Sticky
Locked/Active
Active/Sticky
Sticky/Locked
Sticky/Active/Locked