I've searched for this question but I don't know if I've phrased it correctly.
I'm working on a Joomla website and on one of the pages I have three module positions
content-top-a
content-top-b
content-top-c
So essentially the page width is divided into thirds. But instead of having three modules on this page, I want one module to take up the first third of the page and another module beside it taking up the other two thirds of the page. But when I assign the first module to content-top-a and the other module to content-top-b it just sets both modules to the same width and divides the page 1/2 | 1/2 rather than 1/3 | 2/3
I'm fairly new to Joomla so I hope I got that question across alright.
Thanks in advance for any direction.
This will be a template edit. You will need to look at the css files for the template and add some php code to make it check if only 2 modules are published to only 2 module positions of the 3.
And if only 2, then have a class added to those 2 postions, with some styles on it like below:
<style>
.class1-position { width: 33%; }
.class2-positions { width: 67%; }
</style>
Or if you know the site width, then set that to px for the width of the modules and don't use percentage (%).
Here is some php code for checking if the modules are published
if(countModules('position-1')):
// Some code
endif;
But to fully answer your question I would have to see some code, there are so many variables that I don't know, with what type of template you are working with. But this will definitely get you headed in the right direction.
Related
I have a layout design clearly made for 1200px / 15 cols framework, but my client wants to use Bootstrap 4 with SASS only. Is it even possible to transform Bootstrap into 15 cols layout? I haven't seen such an example online. I'm not a huge fan of Bootstrap for small projects. It is a trend I honestly don't understand. Might be too heavy for a 5 pages website & projects are usually done according to the content, not according to some framework, Twitter-backed or not.
But, this is it.
If it would be possible to code a 15 cols layout, could you give me a hint on how to begin? And how long would it take to perform such an adaptation?
You can just recompile bootstrap 4 with the proper settings.
The documentation at: https://v4-alpha.getbootstrap.com/layout/grid/#customizing-the-grid should explain it, but since it is a temporary link I'll include it here.
First you should be able to build the SASS into CSS, but overall you just have to set the variable for how many columns before including the bootstrap file to be built, or modify the variable.scss file and change the value of $grid-columns value like so:
$grid-columns: 15;
That is the starting point, you may have to adjust other grid variables to control the total width and gutter between each column etc.
You just need to change the $grid-columns variable using SASS.
$grid-columns: 15;
You may also want to check out other variables like $grid-gutter-width to decrease the spacing between columns since you're using more columns.
Working Demo
Also see:
creating custom grid number for bootstrap - Bootstrap
I am using the following module extension in Joomla 3.0 to display articles: https://www.gavick.com/news-show-pro
The module displays articles in columns and slides to the next article on automation or with pagination buttons.
Problem: It always slides by the nr of columns.
Example: If you specify 4 columns and paginate it slides away those 4 columns to the next 4.
Is there an option which allows me to just slide one column away and display a new one at the end.
Apologies for the initial comment. Looked too quickly at the word "Pro".
This isn't a default feature with this module, however some core jquery hacks can be made to the module, although I'm not a fan of some sort of approach and would suggest using a different module. Below os a little something to get you started.
Firstly ensure you are using the jQuery engine rather than MooTools. To to this, in the Module setting, go to the External Files tab and set the Used Javascript Framework to jQuery.
Go to line 275 of the following the following file:
modules\mod_news_pro_gk5\interface\scripts\engine.jquery.js
where you will find this code:
jQuery($this.module.find('.nspArtScroll2')).animate({
'margin-left': (-1 * this.arts_current * this.arts_block_width) + "%"
}, $this.config['animation_speed']);
and replace it with the following:
var contentWidth = jQuery('.nspArt').width();
jQuery($this.module.find('.nspArtScroll2')).animate({
'margin-left': "-" + contentWidth + "px"
}, $this.config['animation_speed']);
You will now notice that the slide moves 1 article at a time, however the previous ones disappear. This is because of the active class. Only articles within the parent element with the class active are set to be visible. From here on, have a mess around with the CSS to set the visibility styling.
Hope this helps
Unfortunately this will not be added to the extension. Here is the belonging github issue:
https://github.com/GavickPro/News-Show-Pro-GK5/issues/214
I am willing to create a logic in which If I can fetch only desirable module in a particular position.
As we know that Joomla displays the module on basis of positions given to modules created, hence there could be several modules for a single position.
Now what If I only want a single module from those modules who has the position, say "positon-1".
Thanks
Each module can be told to be shown only on specific pages. Look in the module settings at the "Menu Assignment" part. There you can set it to show on
all pages
No pages
Only on the pages selected
On all pages except those selected
So you can set a module to show on the homepage in position-1, but on all other pages there is a different module shown on the same position.
Don't position names like position-1, although the example templates shipped with Joomla! do so. Use semantic names for the module positions. Then, within your template, you define, where these positions live.
Now what If I only want a single module from those modules who has ... [a certain] position
That will never happen then. You're going to have a position called search where the serach field is located, and maybe another one called navigation, where you publish your navigational menus. You get a lot more positions, but also much more flexibility. So if you have a module that needs its own position as in your question, let's have it that.
I'm still pretty new to Joomla and I'm familar with adding custom HTML modules in various positions. I'm also familar with setting up the blog layout for the front page with leading articles, intro articles, etc. However I have a case where I would like to have a image slideshow with a static lead article under that, with 3 intro articles (one in each column), with all new articles listed below this hortizontally instead of being added to the top of the list. Is this possible and if so how can it be done?
see The R.I.P. Files
Thank you
Jim
For the slide show +static article I would either put it in a module in a position or put it inside a lead article. In terms of keeping your one article at the top one trick is to give it an order of -1. Another would be to manually maintain the order you want and use order by order.
I'll start out by mentioning that there is a developer forum for Zoo and I have used it already. My purpose posting here is that I typically get a thorough answer within minutes or hours at SO, whereas the responses on dev forums can be slow or non-existent due to the smaller population base.
My question regards Yootheme's ZOO 2.3.2. By default, a product "Frontpage" appears to have a "Categories" box rendered on top of the items. If one turns off all the available options in Frontpage/Template configuration (hide Titles, Count, Descriptions, etc.), an empty box still remains on top of the items.
I've been able to manually remove the box in its entirety by addressing the following file:
media/zoo/applications/product/templates/default/frontpage.php, and commenting out lines 84-92:
<!-- <?php
// render categories
if ($this->category->childrenHaveItems()) {
$categoriestitle = $this->application->getParams()->get('content.categories_title');
echo $this->partial('categories', compact('categoriestitle'));
}
?> -->
Seems like there should be a more eloquent way of doing this on the admin backend, but I couldn't find one. Am I missing something or is my solution the best one?
ZOO is designed to easily be able to modify the built in templates to suit your needs. ZOO templates are meant to be overridden much like Joomla uses template overrides. Rather than editing the default template, you simply create a new template that does what you want it to. The default template should not be changed.
Here is the documentation on ZOO templates - http://www.yootheme.com/docs/home/item/create-a-new-template
Rather than edit the file you mention above, you make a new template here -
media/zoo/applications/product/templates/YOUR-TEMPLATE-NAME/frontpage.php
Then do all the changing you want without messing up the default.
There is an easier way: First, you must identify what calls the item called "frontpage". In PURE yootheme at least it is called from "home" in the "mainmenu". So click "home" buton of the mainmenu, then over the right menu "Parameters(Basic)" you just chose "-select aplication-" instead "frontpage" and that's it.The Frontpage and its "box" are now gone. At least it works for me.