Search

I'm porting a static website into Symphony CMS. I actually had one existing section in the site I was now able to port as a Section, which makes sense.

Now I have a bunch of toplevel Pages that are just, well, pages. So I thought, instead of creating one Section for one of these pages I create a "pages" Section.

I then wanted to map the "page"-content via Pages and a Data Source to the URL.

However, when I started to do that it came to my attention, that I need to create one Data Source for each Page. And I feel that this is kinda stupid to do that way.

Is this a borderline where I should start to write my own extension or is there some setting (e.g. default parameter per page that could help to more specifically query a Data Source) or such?

Or am I just making things complicate and should just create one Data Source for each "page"-content as I create a Page as well for each "page"-content?

If you want to end up with urls like $root/page-title you would need something like the URL router extension. If you want to prepend the symphony page handle to your entry page title, then you wouldn't need any extension, but you'll get urls like $root/page/my-page-title.

Either case, a single datasource is enough.

I then wanted to map the "page"-content via Pages and a Data Source to the URL.

However, when I started to do that it came to my attention, that I need to create one Data Source for each Page. And I feel that this is kinda stupid to do that way.

Well, I'm stupid as well :)

Since static pages can have quite different needs (various static textareas, image fields etc), I'm using Static Section and Custom Preferences (Clone Sections is strongly recommended). I create a Section (static, hidden) for each Page that will be static and a DS that pulls the content for it. It may sound like overkill, but I gain complete flexibility regarding static content structure for each page.

I usually create a Page Content section and put a Pages Field in there (if the content structure for every page is identical or very similar). This is a dropdown populated with a list of your pages. You can give your editable pages a specific Page Type (perhaps editable) and just show pages of this type in the dropdown. You can use a single Page Content data source to filter this field using the $current-page-id parameter which is the numeric ID of the current page.

Many pages, but one section and one data source.

Search the forums for 'static pages' etc. and you'll find many solutions.

I do exactly what Nick said: one 'Page Content' section with a Pages Field.

The biggest 'drawback' I find is the fact that you'd need to create a 'page' in 2 places: a Symphony Page and a 'Page Content' that needs to be linked to the aforementioned Symphony Page through the Pages Field.

In my experience, though, this is not much of a hassle since the page structure (IA) is decided on/built once and changes very little.

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