dynamically inserting images Topic is solved

General project discussion. NOT for help questions.
Post Reply
shandog

dynamically inserting images

Post by shandog »

I have a series of pages that I would like to allow the client to change the text and an image. However, the image is not inline with the text, it is elsewhere on the page. My only option that I can come up with was to insert a table with the text and image content inserted in different rows/columns, However, it is not as clean as I was hoping. Is there any way to dynamically call an image based on the page you are on.
I can have them upload the image with a certain naming convention for it to be picked up.
Thanks for any ideas you may have.
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am

Re: dynamically inserting images

Post by Dr.CSS »

i've done this by adding a new 'content edit box' that shows up on the page being edited...
say you have {content} tag in the template in a table cell then in another place on the page you have an image..
you can put a new tag like so in the place of a hard coded img....

{content block='image'}

the content edit box will be called 'image' and they can use it for images...
shandog

Re: dynamically inserting images

Post by shandog »

Was your content edit box something your wrote, or is this a module of some type. I am a little fuzz on the concept, but I like the idea of placing a {content block="image} tag and having it dynamically appear. I am just not sure how to define which image will show when ,etc.
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am

Re: dynamically inserting images

Post by Dr.CSS »

goto Tags find Content, clik the Help (word) on the right hand side it has an explaination of the {content} tag, i on the other hand never looked there, Ted told me about the title one, then later said it was there...

the image will only show when you put one in that 'box' in the Content » Pages » Add New Content or the Content » Pages » Edit Page: yourpage ,  page... so it will only show on that page.. if you want a randomly generated image you can give that spot a and use the Random image Generater?sp module... but it sounds to me like you want to be able to insert the image yourself or let the client add it, so the first option is the one you want...
shandog

Re: dynamically inserting images

Post by shandog »

Thanks, this worked like a champ. This will be way easier to maintain than the way I had it.
Post Reply

Return to “General Discussion”