Hey and hello!
It's my first post in this forum, at first i wan't to say thanx to all the girls and boys
who programmed this real creat an very simple cms.
THANX!!!
So now my question:
i have one template for all the pages more is not needed, so i think.
but i want to change the picture of every page on the same position in a tag.
so when i click on link1 the picture should be showen of link1 and so on.
is this possible without making a new template for every page where the picture should be changed?
thank you for helping me.
cheers slinux
Changing an Image on every Page
Changing an Image on every Page
Last edited by reneh on Tue Sep 23, 2008 9:00 pm, edited 1 time in total.
Visit: www.engarde.at
Re: Changing an Image on every Page
Welcome slinux
You may want to look into the Banners Module...
You may want to look into the Banners Module...
Re: Changing an Image on every Page
thx, that was maybe that i was looking for.
but how can i control that image1.jpg is only displayed in site_image1.php?
thats what i don't understand.
merci for your help.
slinux
but how can i control that image1.jpg is only displayed in site_image1.php?
thats what i don't understand.
merci for your help.
slinux
Visit: www.engarde.at
-
calguy1000
- Support Guru

- Posts: 8169
- Joined: Tue Oct 19, 2004 6:44 pm
Re: Changing an Image on every Page
You can try something like this in your template
{capture assign="image"}image_{$page_alias}.jpg{/capture}
{image src="$image}
Then, for example if your page alias was 'home', you'd need an: image_home.jpg in your uploads/images directory.
{capture assign="image"}image_{$page_alias}.jpg{/capture}
{image src="$image}
Then, for example if your page alias was 'home', you'd need an: image_home.jpg in your uploads/images directory.
Follow me on twitter
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
-
hok
Re: Changing an Image on every Page
@slinux
There is also a dedicated TAG for this at http://dev.cmsmadesimple.org/projects/sectionimage/
Have not tried this one myself, but it seems like the right tool to solve your problem. You can decide how many levels to show pictures, and you can specify what folder in uploads/images you will use for storing the images (eg. uploads/images/sectionimages).
Just download, unzip, and place function.sectionimage.php in cmsmsrootfolder/plugins
Then log into admin. Go to Extensions/Tags, and find sectionimage. Click the "Help" link to the right, and you should understand what to do.
There is also a dedicated TAG for this at http://dev.cmsmadesimple.org/projects/sectionimage/
Have not tried this one myself, but it seems like the right tool to solve your problem. You can decide how many levels to show pictures, and you can specify what folder in uploads/images you will use for storing the images (eg. uploads/images/sectionimages).
Just download, unzip, and place function.sectionimage.php in cmsmsrootfolder/plugins
Then log into admin. Go to Extensions/Tags, and find sectionimage. Click the "Help" link to the right, and you should understand what to do.
Re: Changing an Image on every Page
@hok
The idea was good.
But it don't works, cause it shows the name of the picture an not the picture.
here the script with all options:
I don't understand why. Do you?
@calguy
It works, thx a lot.
What would be interesting for me is also using it in connection with flash,
so that also flashfiles can loaded in.
The idea was good.
But it don't works, cause it shows the name of the picture an not the picture.
here the script with all options:
Code: Select all
<div class="picture">{sectionimage levels="1" extension="jpg" image_path="/uploads/images" byname="1"}</div>@calguy
It works, thx a lot.
What would be interesting for me is also using it in connection with flash,
so that also flashfiles can loaded in.
Visit: www.engarde.at
-
hok
Re: Changing an Image on every Page
@slinux
Maybe I should have tried this Tag before recommending it:)
The only thing you actually have to do is specify the whole path to your images like so (at least that worked with me).
Maybe I should have tried this Tag before recommending it:)
The only thing you actually have to do is specify the whole path to your images like so (at least that worked with me).
Dont know why this isnt automated in the script, but maybe this would be fixed in future versions:){sectionimage levels="1" extension="jpg" image_path="http://www.yourdomain.something/uploads/images" byname="1"}
Re: Changing an Image on every Page
thank you!
next time i try setting a absolut path!
next time i try setting a absolut path!
Visit: www.engarde.at
Re: Changing an Image on every Page
If you have the {metadata} tag in the you may not have to give the full path to the image...
It should give a base tag...
It should give a base tag...


