1
trspice
How can I allow content on homepage and block from registration page.
  • 2007/6/26 17:43

  • trspice

  • Not too shy to talk

  • Posts: 193

  • Since: 2007/3/24


I use the smart tag below to display some content on the home page but when I go to register.php, user.php, edituser.php, notifications.php, viewmsg.php the content shows up. Apparently because they are all part of the system.

What command can I use to make the content show only on the home page?

Thanks

<{if $xoops_dirname == "system"}>Show This<{else}>Show That<{/if}>
There's nothing but science....
The Reggae Album

2
Quest
Re: How can I allow content on homepage and block from registration page.
  • 2007/6/27 0:24

  • Quest

  • Friend of XOOPS

  • Posts: 1034

  • Since: 2005/11/19


Check your block settings. See if you have it set to be viewed on All Pages. If it is, then change it to Top Page. Then it should only display on the Top Page/Home Page.

Quest

3
trspice
Re: How can I allow content on homepage and block from registration page.
  • 2007/6/27 20:03

  • trspice

  • Not too shy to talk

  • Posts: 193

  • Since: 2007/3/24


This is not for a block. I use the file include tag to call an HTML file with some images and information which is only displayed on the home page above the main blocks and also excutes a javascript.

I want to use the smart tag to identify the homepage and show this info. The xoops_dirname method makes it show on the other pages associated to the system folder as mentioned in the first post.

How can I make it show only on the home page.
There's nothing but science....
The Reggae Album

4
aglchina
Re: How can I allow content on homepage and block from registration page.
  • 2007/6/28 0:48

  • aglchina

  • Just popping in

  • Posts: 6

  • Since: 2005/6/28


You can modify index.php like this:
include "header.php";
  
$xoopsTpl->assign'is_homepage',true); //add this code 
  
include "footer.php";


And edit you theme
<{if $is_homepage}>Show This<{else}>Show That<{/if}>

5
trspice
Re: How can I allow content on homepage and block from registration page.
  • 2007/6/28 18:04

  • trspice

  • Not too shy to talk

  • Posts: 193

  • Since: 2007/3/24


aglchina, many thanks. That worked exactly as I desired.
There's nothing but science....
The Reggae Album

Login

Who's Online

361 user(s) are online (220 user(s) are browsing Support Forums)


Members: 0


Guests: 361


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Nov 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits