1 reply [Last post]
TEPEGroup
TEPEGroup's picture
Offline
newbie
UK
Last seen: 15 weeks 6 days ago
UK
Joined: 2017-11-22
Posts: 2
Points: 4

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: 6 hours 44 min ago
Dallas
Timezone: GMT-5
Joined: 2004-06-25
Posts: 9677
Points: 3745

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.