Search

I'm trying to set up a blog so that hitting:

http://foo.com/write/ 

lists all blog entries. And that by going to an individual entry:

http://foo.com/write/my-entry

shows just that entry.

I believe I understand a way to make this work, which is to create two data sources: one that contains all entries, unfiltered; and one that is filtered by entry. Then I would include both of these Data Sources in one Page and use a little logic to show one or the other. The problem is that the resulting source XML will always contain all the articles AND the one entry I need, which seems wasteful.

So my questions are: is this a performance problem? Is there a better way to do this but still retain this URL structure and behavior?

A similar topic was covered a bit in this post but the answer when applied to my situation seemed to have a same result: one big XML page.

You can also use a single data source: take your filtered data source and set a higher number of returned items (it's 1 at the moment, I guess). On the overview page the data source will not be filtered as your page parameter is empty. So it will either show one or multiple entries based on the URL context.

Create an account or sign in to comment.

Symphony • Open Source XSLT CMS

Server Requirements

  • PHP 5.3-5.6 or 7.0-7.3
  • PHP's LibXML module, with the XSLT extension enabled (--with-xsl)
  • MySQL 5.5 or above
  • An Apache or Litespeed webserver
  • Apache's mod_rewrite module or equivalent

Compatible Hosts

Sign in

Login details