Should I create different pages for each article? Looking for solution for sharing inidividual article
here’s the thing. I am bulding a website for a local dog shelter. There will be the main page "Dogs". Then, inside the page will be let’s say 50 dogs. Each dog will have its own description and its own pictures. I’d like that when someone is browsing the page "Dogs" and sees one he/she likes, he/she can share it with his/her friends. So I want that the user is able to share only that particular dog, not the entire page "Dogs". I guess, in order to do that I would need a separate page for each dog. Am I right?
For example in "Dogs" page, for each dog I would put only a picture and some introduction text and then a button that redirects the viewer on the dedicated page with all the content. Is this a right method or am I saying nonsense stuff?
Disclaimer: I just started the web dev "adventure", so currently I can work only with html and css… sorry! 🙂
My suggestions would be:
If you have enough storage on your server (if you are going to put it up on the web) and don’t mind slowish loading times, then have a page for each article.
The way you could accomplish option 2 would to hide all of the home pages content, and then load in only the parts you need, you would be able to find more information on google on how to do this.
Another note: Always call your main file (like the homepage HTML file) index.html, this way, if you upload it to the server, the server will know which file to load in first.
If you don’t want to create 50 dog pages with the complete same html structure, you could use a Server-side language(like PHP) and a database.
This has some advantages for example:
- You don’t need to change all 50 pages if you want to add a link button or a contact Form for example.
You just setup a PHP-file like
dog.php, using then a variable out of a GET-Parameter as Id, to find the specific dog in the database and then load your data and give out the informations.