Keyword

Main Banner shows up on other pagination pages!

  • Chris Hogan
  • Chris Hogan's Avatar Topic Author
  • Offline
  • Senior Member
More
4 months 3 weeks ago #170953 by Chris Hogan
Chris Hogan created the topic: Main Banner shows up on other pagination pages!
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
  • Senior Member
More
4 months 3 weeks ago #170963 by Chris Hogan
Chris Hogan replied the 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.

  • Fotis
  • Fotis's Avatar
  • Offline
  • Administrator
  • JoomlaWorks Support Team
More
4 months 3 weeks ago #170995 by Fotis
Fotis replied the 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...


If you use & love K2, please take a moment to add your review and rate it
at the Joomla Extensions Directory: extensions.joomla.org/extension/k2/


IMPORTANT: Please search the forum before posting a question!

JoomlaWorks Support Team Member

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

  • Chris Hogan
  • Chris Hogan's Avatar Topic Author
  • Offline
  • Senior Member
More
4 months 2 weeks ago - 4 months 2 weeks ago #171021 by Chris Hogan
Chris Hogan replied the 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: 4 months 2 weeks ago by Chris Hogan.

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

  • Fotis
  • Fotis's Avatar
  • Offline
  • Administrator
  • JoomlaWorks Support Team
More
4 months 2 weeks ago #171026 by Fotis
Fotis replied the 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?


If you use & love K2, please take a moment to add your review and rate it
at the Joomla Extensions Directory: extensions.joomla.org/extension/k2/


IMPORTANT: Please search the forum before posting a question!

JoomlaWorks Support Team Member

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

  • Chris Hogan
  • Chris Hogan's Avatar Topic Author
  • Offline
  • Senior Member
More
4 months 1 week ago #171137 by Chris Hogan
Chris Hogan replied the 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.

  • Fotis
  • Fotis's Avatar
  • Offline
  • Administrator
  • JoomlaWorks Support Team
More
4 months 1 week ago #171143 by Fotis
Fotis replied the 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.


If you use & love K2, please take a moment to add your review and rate it
at the Joomla Extensions Directory: extensions.joomla.org/extension/k2/


IMPORTANT: Please search the forum before posting a question!

JoomlaWorks Support Team Member

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

  • Chris Hogan
  • Chris Hogan's Avatar Topic Author
  • Offline
  • Senior Member
More
4 months 1 week ago #171154 by Chris Hogan
Chris Hogan replied the 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.

  • Fotis
  • Fotis's Avatar
  • Offline
  • Administrator
  • JoomlaWorks Support Team
More
4 months 1 week ago #171164 by Fotis
Fotis replied the topic: Main Banner shows up on other pagination pages!
Glad you resolved this :)


If you use & love K2, please take a moment to add your review and rate it
at the Joomla Extensions Directory: extensions.joomla.org/extension/k2/


IMPORTANT: Please search the forum before posting a question!

JoomlaWorks Support Team Member

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

  • Chris Hogan
  • Chris Hogan's Avatar Topic Author
  • Offline
  • Senior Member
More
4 months 3 days ago #171219 by Chris Hogan
Chris Hogan replied the 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.

Moderators: william white

Powered by Kunena Forum