xoops forums

trspice

Not too shy to talk
Posted on: 2007/6/26 17:43
trspice
trspice (Show more)
Not too shy to talk
Posts: 193
Since: 2007/3/24
#1

How can I allow content on homepage and block from registration page.

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

Quest

Friend of XOOPS
Posted on: 2007/6/27 0:24
Quest
Quest (Show more)
Friend of XOOPS
Posts: 1034
Since: 2005/11/19
#2

Re: How can I allow content on homepage and block from registration page.

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

trspice

Not too shy to talk
Posted on: 2007/6/27 20:03
trspice
trspice (Show more)
Not too shy to talk
Posts: 193
Since: 2007/3/24
#3

Re: How can I allow content on homepage and block from registration page.

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

aglchina

Just popping in
Posted on: 2007/6/28 0:48
aglchina
aglchina (Show more)
Just popping in
Posts: 6
Since: 2005/6/28
#4

Re: How can I allow content on homepage and block from registration page.

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}>

trspice

Not too shy to talk
Posted on: 2007/6/28 18:04
trspice
trspice (Show more)
Not too shy to talk
Posts: 193
Since: 2007/3/24
#5

Re: How can I allow content on homepage and block from registration page.

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