Keyword

Turn off Frontpage Slideshow when in a newspage?

  • Per Mork
  • Per Mork's Avatar Topic Author
  • Offline
  • Junior Member
More
12 years 2 months ago #101557 by Per Mork
I have installed the Frontpage Slideshow module. It works very nice. But what I would like is that it dissapeared when I open a newspage in K2. I have adjusted the module to only open in the front page (the newspage), but it seems that joomla (or K2) act as the same page even if you enter a newspage.

Is there a way to turn Frontpage Slideshow off when inside a newspage?

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

More
12 years 2 months ago #101558 by william white
Replied by william white on topic Turn off Frontpage Slideshow when in a newspage?
Go to the module you created w the slideshow in it at the bottom left menu assignment
clear all
select - only pages you select
pick your main menu home page
save

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

  • Per Mork
  • Per Mork's Avatar Topic Author
  • Offline
  • Junior Member
More
12 years 2 months ago #101559 by Per Mork
ok I explained myself poorly here, sorry. I have allready done what you mentioned. Its just that I would also like it to dissappear when I enter a single news item - only appear at the news listing. Is that possible?

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

  • Per Mork
  • Per Mork's Avatar Topic Author
  • Offline
  • Junior Member
More
12 years 2 months ago - 12 years 2 months ago #101560 by Per Mork
I found a solution. I made a condition test directly in the index.php file. I first placed this code snippet at top somewhere, its a function to get the active URL:
<?php
function curPageURL() {
$pageURL = 'http';
if ($_SERVER["HTTPS"] == "on") {$pageURL .= "s";}
$pageURL .= "://";
if ($_SERVER["SERVER_PORT"] != "80") {
$pageURL .= 
$_SERVER["SERVER_NAME"].":".$_SERVER["SERVER_PORT"].$_SERVER["REQUEST_URI"];
 } else {
$pageURL .= $_SERVER["SERVER_NAME"].$_SERVER["REQUEST_URI"];
}
 return $pageURL;
}

$thisUrl = curPageURL();
$pos = strpos($thisUrl,"/item/");
?>

I then placed this little code snippet around the div containing the slideshow:
<?php
if($pos <= 0): ?>

<div id="nyhetsrull">
        <?php if($this->countModules('user5')) : ?>
        <div id="user5"><jdoc:include type="modules" name="user5" style="xhtml"/></div>
        <?php endif; ?>
</div>
 
<?php endif; ?> 

So, if the string "/item/" shows up in the url, the slideshow dissappear.

This at least works. If anyone know a more elegant solution, please tell.

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

More
12 years 2 months ago #101561 by JoomlaWorks
Replied by JoomlaWorks on topic Turn off Frontpage Slideshow when in a newspage?
It would be more appropriate if you had posted your issue in the Frontpage Slideshow board at forum.joomlaworks.net/ - next time irrelevant posts to K2 will be deleted.

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

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

  • Per Mork
  • Per Mork's Avatar Topic Author
  • Offline
  • Junior Member
More
12 years 2 months ago #101562 by Per Mork
Ok I thought all your products was handled in this forum. I´ll remember it next time.

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


Powered by Kunena Forum