Shopping Basket

 x 

Cart empty


Log In

Find Us Elsewhere

SSL

Forum Search

Keyword

VM mod controller doesnt appear for same position

  • aaronrrc
  • Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
More
7 years 10 months ago #301 by aaronrrc
Hello!

I have a VM modcontroller working perfectly in vm shop.product_details for Antivirus category in BottomBlock position.

I want a copy of the same module to use only in shop.browse for Ipad category in the same position, but it doesnt shows.

If I change this vm modcontroller copy to any other position the module shows!, and when I go back to BottomBlock position again the module appears.....but the problem is that my original module disappears on shop.product_details for antivirus category!

I tried with different modules and the result is the same, I dont know why I cant use different modules for different VM pages and categories but for the same position, any suggestions?? help please!

Please Log in or Create an account to join the conversation.

More
7 years 10 months ago - 7 years 10 months ago #302 by boggler
Hello, this sounds like a problem with your template. It may be that the module position is restricted to only show one module in that position.

Joomla uses a countModules function to count how many modules are assigned to a position, it does this just by counting the number of enabled modules in that position.

The thing is that VM ModController works by suppressing the output of a module when it is not required, it does not actually remove a module from a position - there is no way to do that without hacking the core Joomla code, which would really not be a good idea. So from Joomla's point of view there would appear to be two modules in the same position.

You will need to edit your template in some way to deal with this. If you can find the code that restricts the position to only show one module then remove that.

Otherwise you may need to use a different position, or perhaps create your own position. It may require some thought but it should be possible to get an acceptable result.

If you are showing the same content in the module in each case you may be able to get round this by using only one instance of the module but assigning it to both the category browse page and the product details page.
Last edit: 7 years 10 months ago by boggler.

Please Log in or Create an account to join the conversation.

  • aaronrrc
  • Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
More
7 years 10 months ago - 7 years 10 months ago #303 by aaronrrc
Hi Susan, thanks for your Fast reply!,

In fact I had to hard code my template to get working with the module. I tried with multiple positions like left, right, etc... where I can have more than one module for that position, and when I publish another vm modcontroller in that position for another page, the first modules disappear and the new module appears, I attached a screenshot about what did I do to get working with my template, maybe you can see it and give some ideas.


I have to say that when I work in Normal pages (no VM pages) with Normal Modules (No VM modcontroller modules) everything works well, this is the reason that I have to think that I have to change something in helper.php of vm mod controller....

Here is the full screenshot:

img811.imageshack.us/img811/6326/screenshotgb.jpg
Last edit: 7 years 10 months ago by aaronrrc.

Please Log in or Create an account to join the conversation.

More
7 years 10 months ago #304 by boggler
I don't think that there is anything that you can change in the module which will solve your problem, this is a template problem. It seems you didn't really understand what I was saying.

As you say, there is not a problem when you assign modules to the position in the normal Joomla way. This exactly confirms what I said before. This is because when you assign them to a position using the normal Joomla module assignment a module is either assigned to a position or not. Joomla just counts the number that are assigned, it does not check whether there is actually any output from the module, and in this case it does not need to.

Because VM Modcontroller works by suppressing the module output this means that Joomla can get it wrong when counting the number of modules. It thinks that there are really two modules assigned to the position when there is only one with any output. Because your template is only allowing one module to appear in the position it is causing the second module - incorrectly - to drop out.

Unfortunately I don't believe there is a simple solution to this problem, except to use a different position where there is more room for a flexible number of modules. You are welcome to send me the template and I will have a look to see if there is something that can be done to fix this, but I cannot guarantee it will work.

Please Log in or Create an account to join the conversation.

  • aaronrrc
  • Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
More
7 years 10 months ago #305 by aaronrrc
Thank you Susan, How can I send you the template as Private message or mail?

Please Log in or Create an account to join the conversation.

More
7 years 10 months ago #306 by boggler
You can send it to the address from which you received the order information and download link, if you want you can attach to a reply to one of these.

Please Log in or Create an account to join the conversation.

  • aaronrrc
  • Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
More
7 years 10 months ago #309 by aaronrrc
Finally solved thanks to Susan!:woohoo:

For those that have the same problem with yootheme to work with VM mod Controller follow the steps described in the screenshot attached in above post, but dont use:
<?php if ($this->warp->modules->count('bottomblock') && JModuleHelper::renderModule(array_shift(JModuleHelper::getModules( 'bottomblock' ))) != "") : ?>

instead, use:
<?php if($this->warp->modules->count('bottomblock') &&  $this->warp->modules->render('bottomblock') != "") : ?>

Susan, thanks for the excellent support, youre awesome!

Please Log in or Create an account to join the conversation.

More
7 years 10 months ago #310 by boggler
Great I am pleased it is working.

It is always the Yootheme templates that seem to give problems with this module. They are beautiful looking templates but SO complicated.

Please Log in or Create an account to join the conversation.

Moderators: boggler
Time to create page: 0.180 seconds

Donate to Us

If you like our extensions, consider making a donation to say thanks.