1 reply [Last post]
TEPEGroup
TEPEGroup's picture
Offline
newbie
UK
Last seen: 4 years 13 weeks ago
UK
Joined: 2017-11-22
Posts: 4
Points: 8

Hi,

I'm new to CSS and development in general and I was wondering if anyone knew; how to display a figure i.e. £1,000,000 on one page and then have it display on another page automatically, instead of me having to manually update the figures on all the pages that figure is displayed on.

I was originally thinking php or javascript but I think this might be able to be done in CSS?

gary.turner
gary.turner's picture
Offline
Moderator
Dallas
Last seen: 2 years 3 weeks ago
Dallas
Timezone: GMT-6
Joined: 2004-06-25
Posts: 9776
Points: 3858

SSI

The simple solution is to use Server Side Includes (SSI). Create a file that has the value and have each page where it is to appear 'include' the file. If the value changes, edit the file and the new value will appear everywhere it's included.

If the value is dynamic, it will work better with a server-side script, e.g. PHP instead of SSI. All common server-side languages have some form of 'includes'. Javascript, while it can be done, creates code bloat and is not accessible. IOW, it is inapropriate.

gary

If your web page is as clever as you can make it, it's probably too clever for you to debug or maintain.