ProgrammingThis forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I want to add a link at the bottom of my website, but my website has several pages. How can I add this link to the bottom of all the pages without having to edit each one individually? Is there a way to do this in the liked stylesheet?
I'd generate the HTML pages instead (or go over them all with AWK before publishing), but maybe you can use :after. I'm not sure you can have a link in :after though.
You could also use PHP 'include' command (to include code snippets in all your pages. Possibly you'd have to enable PHP support (if it isn't already enabled).
You could also use PHP 'include' command (to include code snippets in all your pages. Possibly you'd have to enable PHP support (if it isn't already enabled).
OR "include" it as a <script=javascript src="common.js"> by surrounding the link line with document.write(" and "); pair if you don't want to enable server support. ie. simple static web page. Of course don't forget to escape double quotes or use single quotes.
I went with the PHP "include" solution. It works great, thanks. Although the concept of generating content is attractive and I would like to give it a try, it sounds a little too daunting for a noob like me. If you care to suggest a resource for learning this type of thing, I would love to see it.
If you want to see the site, it's yawningdogge.com. But do bear in mind it's not meant to actually be good, it's really just a lab environment for learning web stuff.
Although the concept of generating content is attractive and I would like to give it a try, it sounds a little too daunting for a noob like me. If you care to suggest a resource for learning this type of thing, I would love to see it.
You'd typically either install software (such as Wordpress) that does it for you. With Wordpress you just install it, create an account, and optionally create a "theme" make it look like anything you want. Then you log into the account, and you create your content the way you create posts on this forum.
The theme can automatically add a footer to each page, for example.
My wife took that approach to her website with tepid results. She tried wordpress for a while but finally settled on wix.com which she really likes. They are both valid ways to get a website up and working, but I don't really think they are a good way to really get into the nuts and bolts of web development which is what I'm trying to do. I personally found wordpress to be user-hostile to the point that learning HTML, CSS, PHP and cgi seemed a lot easier and more fun.
Well, if you're starting with web development you do need to get to know what websites are made of (ie. html, css, js or php on the server side). Then however, once you have some knowledge of them, you probably would like to start using a CMS (Wordpress, Drupal) or a web framework to develop your websites/web applications. Once you know how to write templates in eg. Wordpress, you'll be WAY more efficient using their platform with all its functionality than writing everything from scratch.
At the beginning you can develop things manually, later on, as your projects get more complex, it won't be a feasible or even sensible option.
For CSS I'd recommend starting each project with Sass straight away.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.