frequent changing of portfolio images

3 replies · opened Nov 29, 2016

IivanpossNov 29, 2016

I am building a portfolio page of about 25 items. All of the items (images) on this page will change weekly or bi-weekly. I could go into the HTML file and manually change all 25 img tags (time consuming). Or I could use generic names for each image - item1; item2; item3 and swap out a whole image folder with matching names weekly... but I usually like to have image names that are descriptive of the item.
Is there was a way to use css to reference the images for the image tag (I tried background-image but that didnt seem to work). Example: inside a linked stylesheet have the 25 image references that could be called by the img tag id. So I would only have to change the css in the stylesheet. Faster than digging through all of HTML code.

Any sample code or ideas? Css? Javascript?

SSemicolon WebSTAFFNov 30, 2016

Hello,

We definitely understand your Usage Criteria but unfortunately this is not really recommended keeping SEO in mind. It is much recommended to change the HTML Codes which will keep everything simple and will also help immensely in enhancing the SEO of your Website which will in turn keep a lot of content on your Search Engines.

Additionally, this can be definitely achieved using PHP Functionality where you can save all the Image Names in Variable and simply echo those variables at their respective places.

Hope this Helps!

Do let us know if we can help you with anything else or if you find any further issues with Canvas.

IivanpossNov 30, 2016

ok so keeping SEO in mind... i should not utilize PHP to achieve this?

SSemicolon WebSTAFFDec 4, 2016

Hello,

PHP can definitely be used as it is more easier to Setup. You can simply create a PHP File with the Variables having your Image Names and then include it in your HTML Document, then simply call the Variables declared in the Included PHP File on the Places of the Image Names. Also, make sure that you change the Extension of your HTML File from .html to .php as it is required for the PHP Codes to work on your File.

Hope this Helps! Thanks for your Patience.

Do let us know if we can help you with anything else or if you find any further issues with Canvas.

Have the same question, or something new?

Sign in to the Canvas dashboard to reply or open your own topic. Canvas owners get direct help from the SemiColonWeb team.

Reply on the dashboard