Heyula explained it very nice but I would like to show you one example how to easily change images depending on publisher article
The image can be a image in the header(theme) or in a custom block
The url of all publisher articles looks like this
1. if url rewrite method is Path-info:
"modules/publisher/index.php/item.2/name-of-article.html"
2. if no rewrite method is on
"modules/publisher/item.php?itemid=2"
The imortant thing is that the smarty "$xoops_requesturi" always returns
"modules/publisher/item.php?itemid=2"
it doesn't matter if you have set the rewrite method or not
My idea is to name the image like the id of the article and then to load this image in the particular article
Example
1.jpg in itemid=1
5.jpg in itemid=5
24.jpg in itemid=24
....
the first thing to do is to get the id of the article
I will use the "$xoops_requesturi" smarty.
As I explained above it returns follwing
"modules/publisher/item.php?itemid=2"
What I need is the number behind the "="
first I need the position of "="
I will assign the position number to a smarty variable so I can use it later
<{assign var=pos value=$xoops_requesturi|strpos:"="}>
The var $pos now stored the position like 45
Now let's get the number after the "="
<{$xoops_requesturi|substr:$pos+1:10}>
You can now store the image (example: 22.jpg) in "your_theme/images" folder and use it like this
<img src="<{xoImgUrl}>images/<{$xoops_requesturi|substr:$pos+1:10}>.jpg" />
This is for sure not the best way, but I wanted to show you that you can do pretty much with smarties.