Search

hi,

n.b.: this is not a feature request, just a question out of interest.

is there any way to do the following in s2?

a page: http://servername/projects/

projects can be accessed with http://servername/projects/project/

Each project has section links to news, blog and documents.

is there anyway to create subpages with dynamic urls? i would like to be able to have the following pages:

  • http://servername/projects/project/docs/
  • http://servername/projects/project/blog/
  • http://servername/projects/project/news/

where project is the name of the project, but docs/blog/news would be symphony pages. i know how i can solve it just using XSL and generic url parameters after project, but i was wondering if the other approach would work as well.

regards, sb

URL parameters seems to be the easiest way for me.

If you think about using docs/blog/news as child pages to your project, this could not work as you do not know the parent page name (as this one would depend on the chosen entry of your projects section).

You could also setup some custom rewrite rules to rewrite request for /projects/project/*/ to /projects-*/project/.

rowanjl wrote:

You could also setup some custom rewrite rules to rewrite request for /projects/project// to /projects-/project/.

i suppose that would be a possibility as well, but now i've worked out everything in XSL. not sure how it will scale performance wise, but i'm sure i'll see that once i have more projects and more traffic than a single developer clicking through :).

thx for your comments, sb

I've found that it's often worth using URL schemas that are designed to suit the way Symphony works. Consider

  • /projects/$project/
  • /docs/$project/
  • /blog/$project/
  • /news/$project/

where each of the above is a page with a single URL param. If you specify the appropriate sorting/limiting DS rules, this approach would give you, for free, 4 pages that display entries for all projects. You can then apply XSLT to add links to and within each project.

ah... that's an elegant solution....

But what do you do when you want to have say projects/$project/news and members/$member/news?

But what do you do when you want to have say projects/$project/news and members/$member/news?

My point was that the URL design itself could be revised, rather than the implementation, but if having these URLs is absolutely necessary, then adding the custom rewrite rules you mention would probably be the next best solution.

I've found that it's often worth using URL schemas that are designed to suit the way Symphony works. Consider

  • /projects/$project/
    • /docs/$project/
  • /blog/$project/
    • /news/$project/

where each of the above is a page with a single URL param. If you specify the appropriate sorting/limiting DS rules, this approach would give you, for free, 4 pages that display entries for all projects. You can then apply XSLT to add links to and within each project.

that was a solution i was considering. right now i've gone ahead and created the following URL scheme:

  • /projects/$project/$section/$handle

and am using a load of funky XSLT to apply the correct templates for the correct sections. also filtering the data-sources by default with the {$ds-projects} section id, so for any given project i only get the data i want.

i'm not sure how that will work out performance wise with a lot of information in the future, but right now, it feels fairly snappy (0.2 secs for most pages). i'll probably have a look at creating the url schemas you suggested above and some custom rewriting, but right now, i'm working on getting this project out of the door, so i can use it to carry on working on other projects. :)

if anyone's interested, at the moment, the app is at http://dev.aspsimon.org/projects/

regards, sb

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