Keyword

Main Banner shows up on other pagination pages!

  • Chris Hogan
  • Chris Hogan's Avatar Topic Author
  • Offline
  • Premium Member
More
5 years 2 months ago #170953 by Chris Hogan
Hi there,

When I CLICK to view any other pages FROM THE PAGINATION (at the bottom of my homepage) the main banner shows up at the top of the page again...

This is LEADING PEOPLE TO BELIEVE THEY ARE BACK ON THE HOMEPAGE AGAIN...unless they scroll down!

Please note that I have set the menu assignment to the homepage only.

Many Thanks.

Please see attached screenshot for the area I am talking about.
Attachments:

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

  • Chris Hogan
  • Chris Hogan's Avatar Topic Author
  • Offline
  • Premium Member
More
5 years 2 months ago #170963 by Chris Hogan
Replied by Chris Hogan on topic Main Banner shows up on other pagination pages!
Hi there,

Still sort of stuck with this issue, any advise is welcome.

Regards!

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

More
5 years 2 months ago #170995 by JoomlaWorks
Replied by JoomlaWorks on topic Main Banner shows up on other pagination pages!
Joomla uses the menu system to control how modules are displayed. As a result, when you're changing pages using the pagination links, Joomla uses the same menu itemid and thus the banner module sticks. If you want to show the given banner on just the first page of your K2 content, you can use some PHP in the module's override to hide the banner output on the 2nd+ pages.

I can help with the code but I need you to tell me exactly which module you're using and if the above is of course what you're actually trying to do...

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

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

  • Chris Hogan
  • Chris Hogan's Avatar Topic Author
  • Offline
  • Premium Member
More
5 years 2 months ago - 5 years 2 months ago #171021 by Chris Hogan
Replied by Chris Hogan on topic Main Banner shows up on other pagination pages!
Hi there,

Yes, this is exactly the problem as you put it...

The module I'm using is JSN's EasySlider, please see attached screenshots of the homepage inspect bar, displaying the slideshow banners code on the homepage of my site: www.ourdogsinternational.com

Please also find a screenshot of the 'files and location' of this Module....and finally, I've also included the mod_easyslider.php (in a zip file) which is located in the main folder for this 'EasySlider' Banner Module.

Many thanks!
Attachments:
Last edit: 5 years 2 months ago by Chris Hogan.

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

More
5 years 2 months ago #171026 by JoomlaWorks
Replied by JoomlaWorks on topic Main Banner shows up on other pagination pages!
It's actually better to swap the component view with a K2 Content module. However, the quick and dirty trick is to wrap the module position of the slider with an if statement that checks if "?start" exists in the page URL.

Can you locate the module position that the slider uses inside your template's index.php file? Alternatively, are you using a module override for that slider within your template's /html/ folder?

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

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

  • Chris Hogan
  • Chris Hogan's Avatar Topic Author
  • Offline
  • Premium Member
More
5 years 2 months ago #171137 by Chris Hogan
Replied by Chris Hogan on topic Main Banner shows up on other pagination pages!
Hi there,

I believe I found the position in the templates index.php file: rt-fullwidth
<?php /** Begin Full Width**/ if ($gantry->countModules('fullwidth')) : ?>
			<div id="rt-fullwidth">
				<?php echo $gantry->displayModules('fullwidth','basic','basic'); ?>
					<div class="clear"></div>
				</div>
    <?php /** End Full Width **/ endif; ?>

Any ideas on where to put this "?start" code you mentioned?

Thankyou!

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

More
5 years 2 months ago #171143 by JoomlaWorks
Replied by JoomlaWorks on topic Main Banner shows up on other pagination pages!
Sure. Try this:
<?php /** Begin Full Width**/ if ($gantry->countModules('fullwidth') && JRequest::getInt('start') == 0) : ?>
<div id="rt-fullwidth">
    <?php echo $gantry->displayModules('fullwidth','basic','basic'); ?>
    <div class="clear"></div>
</div>
<?php /** End Full Width **/ endif; ?>

This will check if the "?start" param is set to 0 (=homepage) and show the module then and only then.

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

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

  • Chris Hogan
  • Chris Hogan's Avatar Topic Author
  • Offline
  • Premium Member
More
5 years 2 months ago #171154 by Chris Hogan
Replied by Chris Hogan on topic Main Banner shows up on other pagination pages!
Yes this works - great news as this was a major problem really with users being confused about where they were on the site!

Thanks so much...that was the easy query and fix I've ever had on K2 much appreciated...

Side note: I also replicated the code you gave me for another module positions and it works a treat :)

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

More
5 years 2 months ago #171164 by JoomlaWorks
Replied by JoomlaWorks on topic Main Banner shows up on other pagination pages!
Glad you resolved this :)

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

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

  • Chris Hogan
  • Chris Hogan's Avatar Topic Author
  • Offline
  • Premium Member
More
5 years 2 months ago #171219 by Chris Hogan
Replied by Chris Hogan on topic Main Banner shows up on other pagination pages!
Hi there,

Just a quick one in regard to the above changes to my template's index.php file...should I be copying this file to my '/public_html/components/com_k2/templates' to keep the changes after any template update my provider has.

Thanks

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


Powered by Kunena Forum