Search

Hi, let's say I made a articles' section with 2 entries.

 <titlecontent>
        <section id="8" handle="title-content-section">TitleAndContent</section>
        <entry id="9">
            <title>1st article</title>
            <content><1st article description></content>
        </entry>
            <entry id="12">
            <title>2nd article</title>
            <content><2nd article></content>
        </entry>
    </titlecontent>

Now, I've created 2 pages let's say articleOne.html and articleTwo.html

How can I choose which entry should be associated with a page ?

Thanks.

If you go down this route you'll end up needing to manually create a new page each time you create a new entry.

Depending on what you're trying to achieve, a better way to do this might be:

  • Add a new field called 'name' to your articles section
  • Edit your two entries and enter the names 'articleOne' and 'articleTwo'
  • Create a page called 'article' and give it one parameter – e.g. 'foo'.
  • In your datasource, add a filter for 'name' and enter {$foo} as the value.

This means that when you visit /article/articleOne/ your data source will be filtered to only include the article with the name 'articleOne'.

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