Is there any way to combine the assignment ?

More
9 years 4 months ago - 9 years 4 months ago #28755 by Grusha
Grusha created the topic: Is there any way to combine the assignment ?
Hello.

Is there any way to combine the assignment of a module between joomla default and your plugin ?

Now I see this way:
1)Create in your template(templates\your_template\index.php) 2 module positions , example , expleft1 and expleft2 , and write code for check count for this positions , example
<?php if ($this->countModules('expleft1')): ?>
                    <jdoc:include type="modules" name="expleft1" style="xhtml" />
                <?php elseif($this->countModules('expleft2')): ?>
                    <jdoc:include type="modules" name="expleft2" style="xhtml" />
                <?php endif; ?>
2)For "assign the module only to a category view type" use EXP Module Positions Plugin and position:expleft1
3)Diplicate this module and use standard Joomla CMS "assigned to All pages" and position:expleft2

Then if positions expleft1 have module , then show only this module , if no have then show positions expleft2

Don`t tested but should work.

I try in next version create code for this in plugin.
Last Edit: 9 years 4 months ago by Grusha.
Sorry for my English.

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

The following user(s) said Thank You: contrast