Register FAQ / Rules Forum Spy Search Today's Posts Mark Forums Read
Go Back   MacRumors Forums > Special Interests > Visual Media > Web Design and Development

Reply
 
Thread Tools Search this Thread Display Modes
Old Jan 17, 2013, 11:27 PM   #1
SE30rulez!
macrumors newbie
 
Join Date: Apr 2012
How do I add category links to a website?

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.
SE30rulez! is offline   0 Reply With Quote
Old Jan 17, 2013, 11:46 PM   #2
BuntaFujiwaraaa
macrumors newbie
 
Join Date: Oct 2012
I'm happy to help but I don't understand what you want or need. LOL!
BuntaFujiwaraaa is offline   0 Reply With Quote
Old Jan 18, 2013, 12:01 AM   #3
SE30rulez!
Thread Starter
macrumors newbie
 
Join Date: Apr 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?

Thanks!!!

PS - if the question is still unclear please let me know...
Attached Thumbnails
Click image for larger version

Name:	ex1_mr.jpg
Views:	8
Size:	18.2 KB
ID:	390932  
SE30rulez! is offline   0 Reply With Quote
Old Jan 18, 2013, 12:27 AM   #4
BuntaFujiwaraaa
macrumors newbie
 
Join Date: Oct 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
BuntaFujiwaraaa is offline   0 Reply With Quote
Old Jan 18, 2013, 01:05 AM   #5
SE30rulez!
Thread Starter
macrumors newbie
 
Join Date: Apr 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
SE30rulez! is offline   0 Reply With Quote
Old Jan 18, 2013, 01:08 AM   #6
ezramoore
macrumors 6502a
 
Join Date: Mar 2006
Location: 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!
ezramoore is offline   0 Reply With Quote
Old Jan 18, 2013, 01:16 AM   #7
BuntaFujiwaraaa
macrumors newbie
 
Join Date: Oct 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.
BuntaFujiwaraaa is offline   0 Reply With Quote
Old Jan 18, 2013, 01:28 AM   #8
SE30rulez!
Thread Starter
macrumors newbie
 
Join Date: Apr 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.
SE30rulez! is offline   0 Reply With Quote
Old Jan 18, 2013, 01:32 AM   #9
ezramoore
macrumors 6502a
 
Join Date: Mar 2006
Location: Washington State
Quote:
Originally Posted by SE30rulez! View Post
So then is Wordpress too oriented to blogging? Are there other / better kinds of templates out there?
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.
ezramoore is offline   0 Reply With Quote
Old Jan 18, 2013, 03:39 AM   #10
BuntaFujiwaraaa
macrumors newbie
 
Join Date: Oct 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 Wordpress.com and Wordpress.org

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.
BuntaFujiwaraaa is offline   0 Reply With Quote
Old Jan 18, 2013, 04:27 AM   #11
-pete-
macrumors member
 
Join Date: Apr 2011
Quote:
Originally Posted by BuntaFujiwaraaa View Post
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.
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.
-pete- is offline   0 Reply With Quote
Old Jan 18, 2013, 08:20 AM   #12
SE30rulez!
Thread Starter
macrumors newbie
 
Join Date: Apr 2012
Thanks everyone - all very useful.
SE30rulez! is offline   0 Reply With Quote

Reply
MacRumors Forums > Special Interests > Visual Media > Web Design and Development

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -5. The time now is 08:01 AM.

Mac Rumors | Mac | iPhone | iPhone Game Reviews | iPhone Apps

Mobile Version | Fixed | Fluid | Fluid HD
Copyright 2002-2013, MacRumors.com, LLC