1
CiberEspia
php in theme.html

I am trying to use this code php in theme.html but does not work for me.
Why?


<div id="navcontainer">
<
ul id="navlist">
<{
php}>
if (
$xoops_pagetitle =="News"){ 
    echo 
"<li id="active"><a href="/modules/news" id="current">Home</a></li>"
} else { 
    echo 
"<li><a href="$xoops_url/modules/news">Home</a></li>"

if (
$xoops_pagetitle =="Forum"){ 
    echo 
"<li id="active"><a href="/modules/newbb" id="current">Forum</a></li>"
} else { 
    echo 
"<li><a href="/modules/newbb">Forum</a></li>"

if (
$xoops_pagetitle=="xxxx"){ 
    echo 
"<li id="active"><a href="link1.php" id="current">link3</a></li>"
} else { 
    echo 
"<li><a href="#">link2</a></li>"; 

<{/
php}> 
</
ul
</
div>


I can use another smarty tag for example $xoops_url
how?

2
Mithrandir
Re: php in theme.html

why do you use <{php}> tags?

<div id="navcontainer">
<
ul id="navlist">
<{if 
$xoops_pagetitle == "News"}>
    <
li id="active"><a href="/modules/news"
id="current">Home</a></li>
<{else}> 
    <
li><a
href
="$xoops_url/modules/news">Home</a></li>
<{/if}>
<{if 
$xoops_pagetitle == "Forum"}>
    <
li id="active"><a href="/modules/newbb"
id="current">Forum</a></li>
<{else}> 
    <
li><a
href
="/modules/newbb">Forum</a></li>
<{/if}>
</
ul
</
div>

Should work fine.

Login

Who's Online

242 user(s) are online (159 user(s) are browsing Support Forums)


Members: 0


Guests: 242


more...

Donat-O-Meter

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

Latest GitHub Commits