Building a website

Print Friendly

In my last blog entry, I talked about how my wife and I had started a new website for her run for the New York Assembly in 2006. I want to be clear that this is being done on my own private time and using own my personal computer equipment. I’m going to use this blog to highlight some of the developments on that website as they are added. Things are being staged so that not all features are available at once. Sometimes that is because they are not needed yet and sometimes it’s just that I have finally figured out how to do them.

When I created the first few pages for the site I just used straight HTML. This was somewhat fine when there were only three of four pages but it was still tedious when I needed to change some common features such as the links that show up in the sidebar. I quickly changed the pages to be PHP files and then included several elements such as the header, the sidebar, and the footer. There is also a link to the common CSS file that controls all the formatting. This worked so well that it was easy to add some additional pages, such as the one with photos. Adding a new external link is easy: I just add it to sidebar.php. I’ve also reorganized the sidebar structure several times and the PHP server-side inclusion makes it happen “magically” on all pages.

What I’ve just described is not rocket science to anyone who builds websites for a living but this is something that I don’t do all the time. So it’s a fun learning experience while the site improves. There are so many good resources available on the web that you can find out almost anything you need to know about the core technologies you need to use.

The last “tricky” thing I did was embed a blog. I used BlogSpot to create a blog and then directed it to save the generated files on our site. I then nuked the template used for generating the blog html so that it was pretty bare bones: no CSS, no sidebars, etc. This is the file I now include in our own blog.php. I get the overall formatting for the site along with the correct blog HTML. I let Blogger handle the blog account and the blog publishing, so it works pretty well. I’ll have to go back and tweak this once we allow comments and I’m still thinking about how to handle the blog archives in a style-consistent manner, but so far, so good.

Comments are closed