Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

HTML

Heidi Bada
Heidi Bada
14,197 Points

Can a script be added to a static web site, or page, so that a client can update info without opening the html?

I'd like to be able to allow the client to update the parts that are relevant, without opening html files.

One project in mind involves people who have no tech interest. So they don't even want a WordPress site. No one wants to be responsible for updating it.

But...if one person could be in charge to email an update or run a script weekly that goes to the site somehow, to update the top of the "weekly theme" page with this week's theme (ie. sermon topic), that would be cool. The rest of the site would be nice and secure.

Can that sort of thing be done? What kind of coding is it? Would python be handy, or is it more like javascript or something? I haven't gotten to any of that education yet on Treehouse; I'm just curious so far because it's a common problem in small sites I've helped out with.

1 Answer

It's possible yes, but would probably be more or less equivalent to what they would have to do to update a wordpress site and would probably take longer to set up.

I would create a form for the client to fill out, write a javascipt file to parse the data from the form and use Jquery to append that data to the Html file automatically. The fields of the form could handle headlines, body text, footers, whatever, etc -- based on the field the data is entered into the appropriate html tags could be placed around them and they could be placed in order inside a new variable which itself would then be added to the main page or to a new page on the site. You could host this form on the same server as the site and set it up so that only the client can access it.

They cover most of this in the Jquery course, you should check it out. You can do it with python too, of course, but that sort of thing isn't really covered in the courses they offer here.