Keyword

error in banner

More
10 years 9 months ago #122925 by pablo
error in banner was created by pablo
I have managed to put 2 banner in the middle of the 8 categories k2 with this code in the file defaulft.php. But the problem is that I doubled the banner to dNo final and categories.
I do not see how to fix the error. Deputy image url:

minus.com/i/BtkRDLYemfZA

Thank you very much, I hope you can help

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

  • Krikor Boghossian
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
10 years 9 months ago #122926 by Krikor Boghossian
Replied by Krikor Boghossian on topic Re: error in banner
How about setting a counter. If the counter is 0 or 1 display the banners if not then do nothing and proceed with the items.

JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

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

More
10 years 8 months ago #122927 by pablo
Replied by pablo on topic Re: error in banner
is that I need to publish it in the middle of the category main page, second picture shows. The only problem I have is that I duplicate the end of the category. This is the code that I have set.
<? php if (($ key +1)% ($ this-> params-> get ('subCatColumns')) == 0):>
<- BANNER 1 ->
<php if (JModuleHelper :: getModules ('banner1')):>
<div style="widht:835px;float:left;margin-left:10px;">
<? php foreach (JModuleHelper :: getModules ('banner1') as $ module) {
miss JModuleHelper :: renderModule ($ module, array ('style' => 'line'));
}>
</ div>
<? php endif;>


<- BANNER 1 ->
<- BANNER 2 ->
<php if (JModuleHelper :: getModules ('banner2')):>
<div style="widht:267px;float:right;margin-right:10px;">
<? php foreach (JModuleHelper :: getModules ('banner2') as $ module) {
miss JModuleHelper :: renderModule ($ module, array ('style' => 'line'));
}>
</ div>
<? php endif;>
thank you very much.

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

  • Krikor Boghossian
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
10 years 8 months ago #122928 by Krikor Boghossian
Replied by Krikor Boghossian on topic Re: error in banner
the
<? php if (($ key +1)% ($ this-> params-> get ('subCatColumns')) == 0):>

will not help you. You can use the $key variable like if ($key + 1) == ' Item number you want'

JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

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

More
10 years 8 months ago #122929 by pablo
Replied by pablo on topic Re: error in banner
thank you very much for your help
I do not understand php. then it is not possible to publish banner amid the k2 category as shown in the picture?

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

  • Krikor Boghossian
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
10 years 8 months ago #122930 by Krikor Boghossian
Replied by Krikor Boghossian on topic Re: error in banner
Without editing the template it is not possible.

Did the
<? php if (($ key +1 == 4 )):>

did not work?

JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

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


Powered by Kunena Forum