How to show spotlight section on Home page only, but remove spotlight section on all other pages?
info@elgg.org
Security issues should be reported to security@elgg.org!
©2014 the Elgg Foundation
Elgg is a registered trademark of Thematic Networks.
Cover image by RaĆ¼l Utrera is used under Creative Commons license.
Icons by Flaticon and FontAwesome.
- zac1987@zac1987
zac1987 - 0 likes
- Cim@manacim
Cim - 0 likes
- zac1987@zac1987
zac1987 - 0 likes
- Cim@manacim
Cim - 0 likes
You must log in to post replies.I have success did it!!! I used php if else statement to show spotlight section if the url of current page is homepage or index page. Here is the code :
<?php
$homepage1 = "/";
$currentpage1 = $_SERVER['REQUEST_URI'];
if($homepage1==$currentpage1) {
echo elgg_view('page_elements/spotlight', $vars);
}
?>
Note that it is not working on WAMPserver / Xampp localhost because the homepage url is not the same as your online web hosting / server. You can echo $currentpage1 to check the url of current page.
Demo at : http://plekz.com
You can do it the ghetto way and put display:none in the custom index plugin lol
@Cim, Spotlight is not in custom_index. They both are different plugins. Custom Index control the body of Home page. Spotlight is not in the body, Spotlight is at the middle of Header and Body. Furthermore if put display:none, Spotlight will not show on Home page anymore, I want it show on Homepage and hide from all other pages.
ohhhhhhh i read it wrong