1
achz04
Change image upon changing theme
  • 2010/6/22 9:06

  • achz04

  • Just popping in

  • Posts: 14

  • Since: 2010/6/15


Guys,

Need help here, what code should i write in blocks if i want my image changed when users select other themes.

I have different image every themes... but i dont know how code to point to my theme folder. {X_SITEURL} only pointing to my main page folder...

thanks

2
ghia
Re: Change image upon changing theme
  • 2010/6/22 9:46

  • ghia

  • Community Support Member

  • Posts: 4953

  • Since: 2008/7/3 1


Use
{xoImgUrl img/yourimage.png}>
or
<{$xoTheme->folderName}>/img/yourimage.png


3
achz04
Re: Change image upon changing theme
  • 2010/6/23 3:10

  • achz04

  • Just popping in

  • Posts: 14

  • Since: 2010/6/15


thanks for the advise..

i tried

<{xoImgUrl img/yourimage.png}>


but didnt work... i use it on style code as below..

ul#tabs li a.current { background:  url('<{xoImgUrl myimage.png}>'); color: #ebf68d; list-style: none; }


no image showed..


The second code make me specify which theme folder i want to use which i don't want to because my images change depend on what theme selected.

4
ghia
Re: Change image upon changing theme
  • 2010/6/23 7:20

  • ghia

  • Community Support Member

  • Posts: 4953

  • Since: 2008/7/3 1


The suggested solutions are for Smarty and to be used in theme html and template files.
In style use relative paths, these are always relative from their origin in the theme directory (/themes/mytheme/style.css).
The second one folderName is a variable with the directory in , not an item to be replaced by you.

5
achz04
Re: Change image upon changing theme
  • 2010/6/23 8:07

  • achz04

  • Just popping in

  • Posts: 14

  • Since: 2010/6/15


thanks for the advise... problem settled..

link my css on theme.html

Login

Who's Online

434 user(s) are online (338 user(s) are browsing Support Forums)


Members: 0


Guests: 434


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