1
heyula
Smarty Help
  • 2017/3/1 11:03

  • heyula

  • Theme Designer

  • Posts: 596

  • Since: 2008/4/24


Hello!

I use the following code when I want to show a code in the home

<{if $smarty.server.PHP_SELF=='/index.php'}>
        <{
includeq file="$theme_name/home.html"}>
    <{/if}>


When I want to show the module page

<{if $xoops_dirname == "TDMDownloads"}>
        <{
includeq file="$theme_name/deneme.html"}>
    <{/if}>


I want

<{if $xoops_dirname == "TDMDownloads/singlefile.php"}>
<{includeq file="$theme_name/icerik.html"}>
<{/if}>

and

<{if $xoops_dirname == "TDMDownloads/viewcat.php"}>
<{includeq file="$theme_name/icerik.html"}>
<{/if}>
Is this possible ?

2
Bleekk
Re: Smarty Help
  • 2017/3/1 12:08

  • Bleekk

  • Theme Designer

  • Posts: 941

  • Since: 2002/12/14


maybe you can use
<{if $smarty.server.REQUEST_URI|strstr:'TDMDownloads/viewcat.php'}>

3
heyula
Re: Smarty Help
  • 2017/3/1 12:31

  • heyula

  • Theme Designer

  • Posts: 596

  • Since: 2008/4/24


@Bleekk

I really appreciate it very much. I can make independent themes with this code.

4
Mamba
Re: Smarty Help
  • 2017/3/1 12:58

  • Mamba

  • Moderator

  • Posts: 11409

  • Since: 2004/4/23


You can use Smarty for it:
<{if $homepage}>
It's defined in \modules\system\preloads\core.php EDIT: sorry, I misunderstood what you were looking for. This code above is only to check if you're on the Home page or not.
Support XOOPS => DONATE
Use 2.5.11 | Docs | Modules | Bugs

5
Mage
Re: Smarty Help
  • 2017/3/1 15:15

  • Mage

  • Core Developer

  • Posts: 208

  • Since: 2009/8/2 1



Login

Who's Online

341 user(s) are online (104 user(s) are browsing Support Forums)


Members: 0


Guests: 341


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