Hi all, I imagine this has been discussed before incessantly but I couldn't turn it up with search. I have a request to do a page like:

but entry actually lives here:

so I'm looking for either a) a way to hide the page name from the URL, or b) a way to redirect the short URL to the long URL, preferably without Apache rewrites as I don't have access to the server.

i'm not sure i follow. why does entry need page as a parent?

page is a custom template and associated section with several entries in it, and the page template is different than the root page.

Root page params with XSLT logic that renders home/page template depending on the presence of the param?

oh, i get it now. entry is a url-parameter. i suppose i should've figured that out.

i'm with craig on this one.

If you want the entry handle to be the first parameter you could add something like this to your homepage-template. Allthough the whole idea to do this sounds a bit bad practice to me...

Give your index-page parameter (handle for example)
Make a choose in your homepage-template like so:

    <xsl:when test="$handle != ''">
        <xsl:import href="path/to/entrypage.xsl" />
        <xsl:import href="path/to/homepage.xsl" />

The only drawback of this, is that your entries can only come from one section/datasource, unless you are willing to do some really magic mumbo jumbo by looking for a datasource which matches your handle. This is only very flaky, since when you got two entries with the same handle, it just shows the entry that comes first. Plus you would have to import ALL datasources into your homepage, creating a massive overhead and possibly slowing down your landing-page. After having said all this, the XSL for something like this could look like:

    <xsl:when test="count(data-source-one/entry[title/@handle = $handle]) = 1">
        <xsl:import href="path/to/entrypage-one.xsl" />
    <xsl:when test="count(data-source-two/entry[name/@handle = $handle]) = 1">
        <xsl:import href="path/to/entrypage-two.xsl" />
    <xsl:when test="count(data-source-three/entry[something/@handle = $handle]) = 1">
        <xsl:import href="path/to/entrypage-three.xsl" />
        <xsl:import href="path/to/homepage.xsl" />

My advice: convince your client that you're right and he's wrong. There is an old saying that goes like: 'You hire an expert for a reason. Listen to them!'

Hm, that could work, but how would that function with other regular pages on the site, e.g.

is a standard Symphony page, but in this context it would get picked up as a param and passed to the template...

Edit: saw @kanduvisla's explanation, that's kind of what I thought. I am indeed trying to convince them out of this!

Symphony first checks if there exists a page with the requested name, and if not it sends the parameter.

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