Jump to content

Taging and matching content


Peter Knight
 Share

Recommended Posts

I'm building a site for a college where they teach approx 20 courses.

 
Each course page will have a:
  • tutor
  • duration
  • price

and I'd like each of these to be clickable tags whch loads a page listing matching courses.

 
So if Prof. Beezlebub is teaching religion, I want web users toclick his name and see a list of his other courses etc
In the PW admin, I want editors to be able to specify what courses contain which tags.
 
Can someone give me a very basic overview of whats involved. I don't see a field type called Tags in the Filed setup.
I also want to make sure that a tag from a Courss will load a list of other courses, but not any matching tags from say, a blog.
 
Many thanks
Link to comment
Share on other sites

Cheers Fokke. I'm familiar with the Page field and it's brilliant. I'm not sure that it'd match my tagging requirements though ?

Why not? It's been working for lots of people here. Also using this in Blog. Makes it really easy to search for 'items' tagged by a certain or several words.. 

For examples...search the forums using this GCSE for 'tags'

Link to comment
Share on other sites

You can create a template called something like “category” and use that to predefine your tags. Then you use a page field to select from those. You can find pages that reference a specific page via a page field by using a selector such as

$pages->find("categories=$page");

If you put this line in your category-template for example, you would get all pages that reference that category in their page field called “categories”.

Alternatively, you can use a simple text field for tags, then split that up into an array of individual tags and link each to a search page that selects pages by doing a full-text search on the same field.

Link to comment
Share on other sites

You should certainly check the Processwire demosite aka the skyscraper profile: http://processwire.com/skyscrapers/.

The way you can click there from skyscraper to architect, etc. is in my opinion the same as what you want.

And it can, as Fokke says, be done with pagefields.

The tutor, duration and price are the only "tags" you want, or do you need more real tags?

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...