How do I add category links to a website?

Discussion in 'Web Design and Development' started by SE30rulez!, Jan 17, 2013.

  1. SE30rulez! macrumors newbie

    Apr 9, 2012
    Hi all - Let me begin by saying that I hope this is not too much of a noob question. I have a good amount of coding experience but I am fairly new to the world of HTML, CSS, basic web development.

    Thanks in no small part to many comments and examples in these forums plus a lot of trial and error I feel pretty comfortable with (very) basic web development. With that said, I am just plain stuck on the following:

    I am building a site to hold a bunch of reference information on math and statistics. I am including things like links to other websites, links to .pdfs, my own short essays and formulas, etc. The format is a growing body of info spread over several web pages that I can update from time to time. I have been able to put this together on my own, including using mathjax to fold in LaTeX to support math equations, etc. So far, so good.

    Note: I am not trying to produce a blog or a wiki.

    What I am stuck on is that I want to be able to categorize each entry. Call it "categories" or "tags" or "keywords" -- whatever. When I look at good commercial sites or even wordpress blog templates, there is often a "categories" section, usually over on the right somewhere. Better yet, looking at the MacRumors home page, look on the right and scroll down and eventually you come to a box labeled "Rumors by Product".

    So how do I do that?

    Based on advice I have seen in this forum, I am trying to do things on my own by writing my own html and css from scratch. So far it has beena great learning experience, and so far I have been able to accomplish what I want.

    The bit I am stumped on is how to implement "tags" or "categories".

    Is this some elementary html thing that I have just not picked up on? I would really like to continue developing this from scratch. I know I can throw in the towel and grab a wordpress template or the like, but I really want to learn how this is done "for real." I have loaded up the "Develop" menu in Safari and tried scanning website source. I see so much php, javascript, xml, etc. that I am not sure which bits are relevant and which are not.

    Thanks very much - any guidance will be much appreciated.
  2. BuntaFujiwaraaa macrumors newbie

    Oct 26, 2012
    I'm happy to help but I don't understand what you want or need. LOL!
  3. SE30rulez! thread starter macrumors newbie

    Apr 9, 2012
    more detail...

    Fair enough!! Like I said, I'm kind of in noob territory here!

    So here is an example: The MacRumors home page has this bit on it:

    How does MacRumors (A) assign a category to each posting (iPad, iPhone, etc) and (B) code a link that will grab all of the articles fitting each category?

    I can make a link using "<a ..." to any single bit of my site, but how do I make a link that will grab all of the bits of my site that pertain to a certain topic that I define?

    Basically I can assign one link to one article, page, object, or whatever. What I want to do is have one link that will give a list of many articles that fit some criteria I define.

    How does MacRumors flag, tag, categorize, or classify each article as "iPad" versus "iPhone" versus anything else? And what code is behind the links I pasted in that rolls up just those articles?

    Is there some kind of database working behind the scenes to pull this off? Or can this be done in garden-variety html?


    PS - if the question is still unclear please let me know...:D

    Attached Files:

  4. BuntaFujiwaraaa macrumors newbie

    Oct 26, 2012
    Do you mean you want a page that calls every article that have a certain tags/categories attached to them?

    For e.g

    Page 1
    iPad, Apple

    Page 2
    iPhone, Apple

    Page 3
    Galaxy, Samsung

    YOUR PAGE (calls Apple tags)
    - iPad
    - iPhone
  5. SE30rulez! thread starter macrumors newbie

    Apr 9, 2012
    yes - - So let's say I have a site with the following organization:

    Page 1: "Math Page"
    > Article 1: SVD basics
    > > Tags: LinearAlgebra,
    > Article 2: Gradient Descent Methods
    > > Tags: Optimization, NumericalMethods
    > Article 3: Integration By Parts refresher
    > > Tags: Calculus
    > Article 4: Cubic Spline
    > > Tags: LinearAlgebra, Graphics

    Page 2: "Statistics Page"
    > Article 1: Linear Regression
    > > Tags: LinearAlgebra, Fitting
    > Article 2: etc...

    Page 3: "Python Page.." etc. etc.

    Assume a dozen pages and lots of "tagged" articles on each page.

    I want a list of links to the tags. For example I would like a link that says "Linear Algebra" that, when clicked, will produce all of the articles that have the tag "LinearAlgebra" etc.

    The analogy to the MacRumors site is when you click on the "iPhone" link in the capture I showed, the MacRumors site will show you all of the articles it has tagged as pertaining to iPhone. So what I am asking is: how is that accomplished?

    Thanks again
  6. ezramoore macrumors 6502a

    Mar 20, 2006
    Washington State
    What you're talking about is analogous to categories in Wordpress, which is implemented using a SQL database entry to tag each post with categories.

    There are others here who have a lot more experience with web development, but I expect that if you are using just HTML and CSS you might have difficulty replicating this behavior.

    One thing I know about web development though, is that a little creativity can go a long ways.

    Good luck!
  7. BuntaFujiwaraaa macrumors newbie

    Oct 26, 2012
    You can't do that with basic HTML / CSS knowledge.
    HTML is just pure marking up your structure and content of your website and CSS to design your style of your website.

    With these two knowledge, at most you could only produce static website.

    To retrieve articles/pages, you need a knowledge of doing dynamic website. That would open a whole new level of knowledge you need to learn.

    You should start on javascript, xml, to produce some kind of dynamic structure. But to be able to scale to bigger projects, you need knowledge of server side programming knowledge, most popular being PHP.

    If all this is too daunting, you can try doing themes for Wordpress which actually provide a easier platform for you to produce dynamic content.
  8. SE30rulez! thread starter macrumors newbie

    Apr 9, 2012
    OK - that's what I was afraid of.

    As I was saying I was hoping to be able to code this up myself, but it is starting to sound like a major undertaking.

    I am interested in learning all of the dynamic stuff eventually but it is starting to sound like I have a lot to learn. Perhaps just going with wordpress or the like is more efficient.

    So then the next (and last!!) question I have is: Is a wordpress template the right tool? I am not looking to make a blog. I want to make a site that I (and hopefully others) can use as a source of reference info. An aggregation of content and links to content.

    So then is Wordpress too oriented to blogging? Are there other / better kinds of templates out there?

    Thanks again.
  9. ezramoore macrumors 6502a

    Mar 20, 2006
    Washington State
    Wordpress is quite robust now. It started out as a blogging platform, but is as near as makes no difference a full CMS now.

    There isn't much out there that would be better suited, and there is absolutely nothing that is so easy to operate.
  10. BuntaFujiwaraaa macrumors newbie

    Oct 26, 2012
    Nope, Wordpress has came a long way since its blogging days.

    You should read it up on their site. There's a difference between and

    Basically right now, Wordpress is a popular choice of CMS, and it is a good if you can invest time on it due to its sheer community support and tutorials out there.

    For me personally, I felt it is a better to be able to learn to code your CMS from ground-up but hey thats just me. I'm intending to learn PHP or Ruby and have not be able to decide which to invest my time in.
  11. -pete- macrumors member

    Apr 20, 2011
    I think PHP is the most popular so if you are looking to work on other projects and with other developers in the future, its a good choice.

    As for the OP, your hosting company may offer a "1 click WordPress install" that can make the initial set up much simpler than having to go in a create database tables yourself, it will be worth learning how to do this however since it will give you a better understanding of how it all works and gets pulled together.

    WordPress has a great tagging system that will do a good job of cataloging posts for you and would be the simplest to set up if you are just looking to get up and running.

    If you have LOTS of data and don't mind taking some time to learn another system then Drupal might also be worth a look, its great for making larger and more complex sites.
  12. SE30rulez! thread starter macrumors newbie

    Apr 9, 2012

Share This Page