Have you added a URL parameter to the Page your template is for? Have you added a Data Source for the single video and one for multiple videos? You need to then use the URL parameter on your Page to determine which code block you want to use.
- About Pages: http://www.getsymphony.com/learn/concepts/view/pages/
- About URL Parameters: http://www.getsymphony.com/learn/concepts/view/url-parameters/
- About Data Sources: http://www.getsymphony.com/learn/concepts/view/data-sources/
I know it's a lot to get used to but you will get the hang of it with a little experimentation and there is lots of great help available on the forum: http://www.getsymphony.com/discuss/
This tutorial is doing something similar and has lots of explanation as it goes: http://designprojectx.com/tutorials/master-detail-views-in-symphony/
Essentially you need:
- A Page with a URL Parameter (say, 'id')
- A Data Source called 'videos' which fetches all of your videos for the home page
- A Data Source called 'single-video' which fetches one video by its 'id' (would look like
{$id}
in the Data Source filter box). This will return no results if 'id' is not set. - You need to include both Data Sources in your Page
Then, in your Page Template, you need to check for the URL Parameter to determine which layout you are going to use. This would look something like:
<xsl:template match="/"> <html> <head> <title>Homepage</title> </head> <body> <!-- this is the XSL version of an if/else (basically check if URL Parameter 'id' is nothing, display list, otherwise, display video by the 'id' provided) --> <xsl:when test="not($id)"> <h2>Videos</h2> <ul> <xsl:apply-templates select="/data/videos/entry"/> </ul> </xsl:when> <!-- here is where we tell it which template to use if we do have a video id in the URL. We reference the second datasource (single-video) in this case --> <xsl:otherwise> <xsl:apply-templates select="/data/single-video/entry"/> </xsl:otherwise> </body> </html> </xsl:template> <!-- single video layout --> <xsl:template match="single-video/entry"> <div class="video"><xsl:value-of select="greeting-text"/></div> </xsl:template> <!-- all videos layout --> <xsl:template match="videos/entry"> <li><xsl:value-of select="greeting-text"/></li> </xsl:template>
I hope this helps. Symphony takes a little getting used to but it really makes sense once you start seeing how all the pieces fit together.