3
Hello, here's how i proceed to do something similar.
Create a new file "my_functions.php" in your theme folder.
Copy this code inside
if ($_SERVER['REQUEST_URI'] == "/modules/news/")
{
$this->assign('newsok', '1');
}
?>
Then, in your theme, add this line, right under the body tag
<{include_php file="$xoops_rootpath/themes/YOUR_THEME_NAME/my_functions.php"}>
and you can now use this piece of code in your theme :
<{if $newsok == "1"}>
your code here
<{/if}>
I use this code too for personnal use
if (eregi('viewpmsg',$_SERVER['SCRIPT_NAME']) || eregi('readpmsg',$_SERVER['SCRIPT_NAME']))
{
$this->assign('messagerie', '1');
}
So, for your question, I think that you can use this :
if (eregi('storytopic,$_SERVER['SCRIPT_NAME']))
{
$this->assign('storytopic', '1');
}
and in your theme
<{if $storytopic == "1"}>
your code here
<{/if}>
i'm using this, to display a custom block, only on
http://www.website.fr/modules/news/ webpage.
and not on
http://www.website.fr/modules/news/index.php?storytopic=12 for example.