Need extra help with your Joomla site? Consider paid Joomla support by the developer of Chameleon and MetaMod.
- Index
- » MetaMod Pro
- » MetaMod Pro General Support
- » Make a module appear if a the...
Make a module appear if a the template height reach certain dimensions
Make a module appear if a the template height reach certain dimensions
Hi Stephen, I got an unusual one for you, I hope you will like it!
Joomla template are as you know vertically fluid to acquaint the length of a full text article. Therefore, Right and Left template position are often empty because the module that are permanently there are part of the design within certain proportions.
What is awkward is when the articles are longer and the right or left position leave useless blank spot without any content.
Would it be position to make one or many "backup modules" to fill those gaps by checking height dimensions interval like for example:
Code:
if ( template height --> 1501px-2000px ) return "999";
if ( template height --> 2001px-2500px ) return "999, 1000";
if ( template height --> 2001px-2500px ) return "999, 1000, 1001";
etc.
Cheers,
Alex
Re: Make a module appear if a the template height reach certain dimensions
Hi Alex,
Technically, this very hard to achieve because a module would not have any access to information about the pixel height of any part of the page until the page is actually rendered (i.e. generated, then sent to the browser). At that point it's possible to calculate the height of page of the page using Javascript, but by then it's too late to use this information to add more modules.
There are lots of other similar things that I've been asked, but that have the same problem:
- window size
- screen resolution
- net speed
... these can all be calculated client-side with Javascript, but by the time you've calculated this, you would have to send it back to the server, use this to recalculate the page, then refresh the page. It's all a bit too complicated.
Sorry,
Stephen
- Index
- » MetaMod Pro
- » MetaMod Pro General Support
- » Make a module appear if a the...
Board Info
Forum Legend:
Topic
New
Locked
Sticky
Active
New/Active
New/Locked
New Sticky
Locked/Active
Active/Sticky
Sticky/Locked
Sticky/Active/Locked