-
AuthorPosts
-
March 18, 2008 at 6:30 pm #126705
Hello all,
I need to make a modifiication to JA Avian II to support Front Page Slide Show. Here is what I am doing. I want to use FPSS instead of the gallery component that comes with Avian II, as it offers features that I want to use.
So I replaced the included slideshow with FPSS at user 5, sized it correctly, and it works just fine ont he front page. The issue however is that it is referenced on every page. The solution as proposed by the author of FPSS is as follows:
Many have asked on how to force “Frontpage Slideshow” to display on their site’s frontpage only, when they click on a content item.
There is a background on this, as a change (to the Itemid handling) was introduced in Joomla! 1.0.12. More about it and a proposed solution here:
http://forum.joomla.org/index.php/topic,125365.msg617835.html#msg617835There is also a simpler way to do what you want and this involves adding 2-3 lines of code to your template’s index.php file…
Assuming you are publishing FPSS on module position “user1”, find the “user1” module code (something like <?php mosLoadModules(‘user1’); ?>) and change it to this:
Code:
<?php
if(mosCountModules(‘user1′) && $option==’com_frontpage’) {
mosLoadModules(‘user1’);
}
?>This code ensures that the FPSS will only show up on your site’s frontpage, no matter what, and of course, without touching any Joomla core files.
How to I modify the Avian II template t reflect this? The site (in test mode) is available for your review at http://www.craigsimonphotography.com Just click on the read more for the top content item to see how it displays on content items.
Thanks in advance.
CraigMenalto FriendMenalto
- Join date:
- May 2007
- Posts:
- 4736
- Downloads:
- 0
- Uploads:
- 43
- Thanks:
- 2
- Thanked:
- 531 times in 361 posts
March 20, 2008 at 8:07 am #242672Did you set the FPSS to show just on frontpage? As i just did a test here with FPSS and this template and i cant get the error you get.
April 7, 2008 at 4:28 am #244637Menalto,
The code snippit was to allow FPSS show on the front page. How can you do that from the UI?
Menalto FriendMenalto
- Join date:
- May 2007
- Posts:
- 4736
- Downloads:
- 0
- Uploads:
- 43
- Thanks:
- 2
- Thanked:
- 531 times in 361 posts
April 7, 2008 at 7:52 am #244659You can try to with this one:
<?php if( JRequest::getVar( 'view' ) == 'frontpage' ) { ?>
<div id="ja-topsl-main">
<jdoc:include type="modules" name="user5" style="raw" />
</div>
<?php } ?>April 21, 2008 at 2:37 am #246144Sorry,
I am still not quite getting it. What file is that code from? Any hints on where I should make the change?
Thanks
Menalto FriendMenalto
- Join date:
- May 2007
- Posts:
- 4736
- Downloads:
- 0
- Uploads:
- 43
- Thanks:
- 2
- Thanked:
- 531 times in 361 posts
April 21, 2008 at 5:23 am #246155if you open up the index.php file in the template you see this:
<?php if( $this->CountModules('user5') ) {?>
<div id="ja-topsl-main">
<jdoc:include type="modules" name="user5" style="raw" />
</div>
<?php } ?>
replace with this:
<?php if( JRequest::getVar( 'view' ) == 'frontpage' ) { ?>
<div id="ja-topsl-main">
<jdoc:include type="modules" name="user5" style="raw" />
</div>
<?php } ?> -
AuthorPosts
This topic contains 6 replies, has 2 voices, and was last updated by Menalto 16 years, 8 months ago.
We moved to new unified forum. Please post all new support queries in our New Forum