1
Lunatic-Soul
Slider on the header/footer

Hey
i was designing my new theme and using a_portal theme which has a slider in it,as you know cause the codes are in the file named "theme.html" it will show up in all the pages and i wonder if i can use a code or sth like that to force it show it self in the first page only.
the second question is like xoops.ir and xoops.org how can i use an slide show on the header or footer in my theme,im kinda amature user and ill be so grateful if you explain it to me
ty

2
Mamba
Re: Slider on the header/footer
  • 2013/7/24 7:32

  • Mamba

  • Moderator

  • Posts: 11409

  • Since: 2004/4/23


The best way is to look at existing themes and see how they did it. Some of the recent themes with sliders are: Saka Serenity Orange Regarding the slider on first page only, you can look at Saka. In theme.html it uses following code to check if it is the home page, and if yes, to include the slider.html:
<{if $smarty.server.PHP_SELF=='/index.php'}>
  <{include 
file="$theme_name/slider.html"}>
 <{/if}>
Support XOOPS => DONATE
Use 2.5.11 | Docs | Modules | Bugs

3
Lunatic-Soul
Re: Slider on the header/footer

actually it doesnt work,i used the codes but still i can see the slider in every page of my site

and i have this error on my main page:
Smarty error: unable to read resource: "/xotpl/slider.html"

4
mondarse
Re: Slider on the header/footer
  • 2013/7/30 7:44

  • mondarse

  • Just popping in

  • Posts: 96

  • Since: 2003/2/3 1


That code worked for me.

I guess you still have your slider code in theme.html

Cut and paste the slider code to "/xotpl/slider.html" (create file if you don't have it already), and of course upload "theme.html" and "/xotpl/slider.html" to your site.

Remember also to clear caches completely or activate "theme change check" in admin to see the results.

If you can't success let us see your code by copying and pasting here the section of theme.html where your slider goes in.

MonDarSe


Login

Who's Online

310 user(s) are online (106 user(s) are browsing Support Forums)


Members: 0


Guests: 310


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