5 users online. Create an account or sign in to join them.Users

Search

I've got a default (pre-populated) installation of Symphony with the 'Spectrum' theme running.

I'd like to be able to click the category tag ('Announcement', 'Symphony') at the top of an article and to be directed to a page showing all articles in that category.

I've made some baby-steps with data source chaining over the last couple of days (a concept I believe will be important here) but I've not figured out how best to start going about this problem.

Would anyone be kind enough to give me a pointer or two, before I spend another couple of days flailing about wildly?

Thanks, D

This isn't checked/tested, but here are some typical steps you might need to take. You'll need to substitute certain values to match what your resources actually are.

  1. Make a data source called something like Posts by Category ID. Source: Posts, Filter results by: Category (use {$category-id} - this relates to the page URL parameter you'll create in the next step). Include the fields you want to display in 'Included elements'.
  2. Create a "Category" page (to display all the posts in a single category), and in the 'URL Paramaters' field type category-id. Include the data source you just made.
  3. Visit /category/3/?debug (change the number to an existing category ID) and check the XML output - hopefully you see the posts.
  4. Create anchors with href attributes that point to the categories in your XSLT view(s) if they're not already present (e.g. /category/3), based on a data source that contains all categories (this step is just to provide visitors with the links to get to your new page).

This isn't actually data source chaining; it's filtering. You don't need to chain in this case because you already have the category defined in the URL (in my example, via the category ID), and each post contains a reference to its parent category.

Amazing, David! Thanks very much; I'll give that a shot.

I just spotted mistakes in step 3 and 4 - corrected.

Ta.

Create an account or sign in to comment.

Symphony • Open Source XSLT CMS

Server Requirements

  • PHP 5.2 or above
  • PHP's LibXML module, with the XSLT extension enabled (--with-xsl)
  • MySQL 5.0 or above
  • An Apache or Litespeed webserver
  • Apache's mod_rewrite module or equivalent

Compatible Hosts

Sign in

Login details