I have a navbar, and in it right now I have links to various blogs on my site. I have that same markup throughout my site on all pages.
Here is the thing, when I start growing my site, how do I scale something like this? Right now, I have been going to each and every html page, and doing a copy/paste anytime I need a new link to it or something similar.
I'm sure there is a better way to do this.
so a s per the comment's above there is a slew of ways to go about doing this. One possibility, would be to keep each link as a varchar as well as possibly a title that you want to display for each blog post that would be displayed in the nav bar. then you could build your nav bar dynamicaly each time using a scripting language such as php, python, perl, nodejs etc. Im not sure if node.js will be supported by godaddy but undoubtedly the other would be. The approach you take will be a personal choice based on if you control when user upload content (like an administrator) or if uploads can happen freely. if you plan for uploads to happen freely you will most likely want a dynamic approach, However if You plan to have an administrator to oversee each new entry a static approach could be used and called to regenerate the nav. bar each time a new post is made available. Again, if you need some help getting this started you know where to find me!
-best of luck
Related
I've never used WordPress.org before. I'm wondering if I can convert this html website that I have to wordpress exactly the same?
https://reporting.pacificamerican.org/pas/
And if this website is a wordpress site, does it means that I don't have to go into the codes if I want to update my content? Because right now with html site it takes more time to update all the contents.
Thank you.
Yes, you can, but looking at the content I wouldn't say it looks like a great idea. Mostly because of how static the current content seems to be.
Pros:
It looks like you are about to add a blog-page. WordPress does make such re-occuring content easy.
It looks like you have repeated the menu on every page. (If you change the menu on one page, then you have to makes changes to all pages as well?). WordPress would help with that and let you use one menu everywhere. But there are also tons of easier methods to accomplish the same thing without WordPress. (For example <?php include 'menu.php';?> using PHP).
Cons:
The "multiple sub-pages in one page" that you are using doesn't play naturally with WordPress. Absolutely possible yes, perhaps not even difficult, but not out-of-the-box for sure.
The time it would take to edit pages would likely not change as drastic as you hope. I believe that the current content looks so static that anyone with a bit HTML/CSS knowledge would rather want to edit those static html files over having to click around in the WordPress admin interface.
The scroll-spy, editing tables and things like the yearly admissions does not come naturally either. I can think of a few dozen ways to solve such things with WordPress, but if you are going to do this work yourself, then the WordPress-conversion will take some effort and the results will not always be as pretty as you might imagine.
You'll definitely take a performance hit over using only static html. (But that is true for any CMS/framework)
My suggestion would be to first look at your current workflow. Perhaps look at an IDE that can upload with a click or on save, have history so you can back up when things break, and predefined snippets that make static content changes easy, (and of course code syntax highlighting!).
What tools are you using now?
Also remember that you are asking on a coding-site. Not many here would opt to use the WordPress editor over simply editing html-files. In fact, I dare to say many here carries a deep grudge after having to work around some specific quirks in the WP editor (aka tinyMCE).
Sure, you could replicate the layouts.
Sure, your content would be editable with just a form.
It would take a lot of effort, but certainly doable.
I am currently in an internship and making a website for someone. I have nearly finished the website and they would like a way to easily edit the website without messing around too much with code. They have no development team and once my internship is over, obviously they'll be stuck and they would like a way to edit the content on the website. How can I go about doing this? I mentioned a WordPress site to them but they didn't like the sound of that. Are there any other ways in which I can allow them to have this functionality?
Cheers
You can either create a Wordpress-similar, with a login, and while navigating through pages they would have options normal users do not have (e.g: delete, etc).
Or you could create an admin dashboard, where there would be every settings.
I think the second one is the best option for you, as it doesn't require you to modify any pages already created, and you will not have to adapt the style of your website to those supplementary options which would be shown on every pages if you used the first option.
Edit:
Or you could have all the content of the website in files, so that they simply need to edit the files to change the content. Even though I think option 2 is better, this one is a lot simpler to put in place.
I've been using Rails for a few weeks now and have loved using it to make a fully-baked application. Now, I'm trying to use it for an agency site where we have services, articles and projects (which fit models and controllers nicely)
I've created the usual new/edit form views for these and it works perfectly (even have Redactor JS set up nicely with it)
The bit where it all feels a bit awkward is trying to allow for editing on the "index" pages - ie: the Services page itself would not only list each service but would have a few different bits of text and buttons that ideally I'd like to be able to content manage. Ditto for some content on contact pages and the like.
I've looked at using ActiveAdmin (which looks like a great tool, but ideally I'd like to keep it less serious and edit these pages in the front-end, this looks a perfect tool for managing large amounts of data)
Am just wondering how experienced devs would go about this? Would you have a model/controller for every page so that you could have routes like services/edit, home/edit, or perhaps there is some other way? Or maybe I'm just trying to get Rails to do something it's not really made for?
Thanks.
This probably comes down to
who's going to edit these semi-static pages?
how often?
If you're the only one doing it, no more than once a month, then just set up static pages with appropriate controllers.
If a bunch of people are doing it, on a fairly frequent basis, then go with ActiveAdmin, or a CMS gem, or etc.
Don't let 'elegant' get in the way of 'just do it'.
By "dynamic links", I mean a list of links that will constantly be updated.
To illustrate my question, I have a website that I am constantly writing new articles for. I currently have about 10 articles. If someone is to read article #5, there is a list of links to all 10 articles in the right panel of the page. As I update the site, and article #1 becomes out of date, I'd like to replace article #1 with article #11. Rather than updating the links within every article (so 10 times), is there a way to update the links once and have them all update simultaneously to every page?? Could I create an iframe for this??
Thanks for any and all help!
What's your goal? Do you want to learn to be a web developer? Or are you mostly concerned with getting your articles published?
If you want to be a web developer, I'd recommend steering clear of large CMS system like Wordpress or Drupal. Those are great products. But you want to learn the basics first. I think starting a PHP tutorial is the way to go.
If you just want to publish your articles, I'd recommend you find a nice place to create a blog. There are so many to choose from. It all depends on how much you want to spend.
Feel free to ask follow up questions. Web development sounds simple. But it's really a complex topic. I can't imagine what is must be like starting out these days with so many choices and competing technologies.
One way to do it would be to use Server-side includes. (Wikipedia) They work like this:
<!--#include file="some-content.html" -->
or
<!--#include virtual="some-folder/some-content.html" -->
The difference is file="" finds a file relative to the current page, whereas virtual="" finds it from the domain root. Either way, this method can use any type of regular text file as a source. The actual addition of the content is done by the server (hence the name) so its contents will be parsed as regular HTML and all CSS will apply to it as if the file were part of your page. I don't know about compatibility with different hosts, but if your web server supports it, this is probably the easiest way to go.
On this page, I want to get my scrolling dinosaur name window to specifically keep that dinosaurs name at the top so the person doesn't have to scroll all the way down to the next dinosaur.
I also want to know if there's an easier way to do this window.
My predicament is this....
I have over 30 dinosaurs on here. Each time I add a new one I have to update each and every one of the dinosaurs pages to add that one new dinosaur. Its not really time effective... Is there a better way without having to use frames?
My code is open so you can look at it and modify it at your leasure.
Thanks!
Vince
At this point I would suggest you go for server side code. Since you have 30 dinosaurs, it would be much easier to create and maintain a simple page using server side scripts such as PHP or ASP.NET to load the dinosaur from a database.
What are server side scripts?
Server side scripts allow you to dynamically generate a page on the fly whenever the user requests a page. For example, take youtube's search page. Rather than generate a seperate page for every single possible search term, they simply have a base template there, and then they fetch the relevant results based on the search query. The same can be applied to your site. You can have one page for all the dinosaurs, and you would just load the appropriate dinosaur based on the url.
Once you do that, putting the current dinosaur at the top of the page would be a trivial task. Since it appears that you already have a fair amount of knowledge in HTML, it should be easy for you to pick up and use some PHP. Codecademy has some excellent tutorials.
Along the same lines as Kevins answer but more specifically I'd like to recommend you look into a PHP MVC framework such as CakePHP, Laravel or CodeIgniter.
You've done all the hard work manually building these pages, which is awfully time consuming.
Once you learn one of these frameworks and you'll rebuild this site in a day.
If your links had id attributes on them you could scroll the list to a position by linking to #whatever. Here's a quick code example of a link.
<li id="camarasaurus">Camarasaurus</li>
Here's a small example: http://jsbin.com/ExExEvAB/1/edit?html,css,output
As for making it easier to administrate, I'd look into PHP since it's widely available and there's tons of resources to learn from. When you're basically looking for is <?php include "dinosaur-menu.html" ?> since you're thinking in terms of frames. You can make it even easier but this alone should make it a ton easier to update.
I really started to enjoy Mixture recently. It's great for prototyping and is, in my opinion, perfect for exactly what you're trying to do here.