Search

Hello,

on a website I want to display the page team twice in the navigation, placed in different main menu items. This is as visitors might once be interested in the team as part of the company and once when looking for a contact.

Is there a way to create a page that is not a page itself but an alias for another page? The navigation would list this page but not with its own path but with the path of the page it is linked to.

Thanks Moritz

So you want to mix a generated menu (from Symphony pages) with custom links? Or just want to have a page entry shown twice in your generated menu. (A simple "yes" answer will kill me here :)

About combining menus: I would do this on XSLT level, combining the XML tree from navigation and some custom XML for the other links, maybe a static xml datasource.

Another - more UI - way could be to create a section for menu entries, where entries would define menu item, that is names, page links and relations between each other.

If we are talking here about URL redirects, e.g. like a /page/b/ link should redirect to /page/a/, then here are some routers (check out every linked word).

Hello Juro,

instead of killing you this sunny Saturday, I am giving you "the latter" instead of "yes". I want a page to appear twice in a menu. Thanks for your ideas!

A redirect is not what I am looking for nor do I want to have the entries two have different url. The page is called company/team and I want it to also appear at contact/team but the link should visibly point at company/team so that search engines don't think it is duplicate content.

Thanks again Moritz

Use the tags/page types to group your nav items.

In the Blueprints > Pages there is a input field for page types.

In your XSLT if you apply a template that outputs the nav items grouped by page type, you are in effect allowing the same page to exist in different nav groups.

Make sense?

Hi Moritz,

you're welcome.

'Been thinking about the combination option I've mentioned, here is one more idea, maybe more easy on XSLT, but it depends on the size of your page structure and how many doubled links you want:

You would have your pages generated by Navigation datasource, which would give you references on your pages in XML, and next you would create a Static XML datasource, where you would describe your whole menu in custom tags, referencing those pages by their e.g. id.

Like giving a name Menu for the static datasource, and its content would be e.g.:

<item id='1'/>
<item id='2'>
    <item id='3'/>
    <item id='4'/>
</item>
<item id='5'>
    <item id='4'/>
</item>

You could take the actual Page data by item's id, best with a xsl:key I think, like <xsl:key name='menu-entry' select='/data/name-of-your-xml-navigation-tree//page' use='@id'/> during your XSLT iteration over Menu's items.

So not having some middle-point XSLT which would take Pages and custom link definitions from somewhere, but you would parse only your static xml.

And finally, if you want only one or so link to duplicate, I think I would just use javascript (like jquery) to dynamically add such a link into the menu.

Lastly (I promise :), I don't like or recommend in general to create jumpy links throughout the main menu. It's not user friendly etc. Short, I would create Related links blocks or so in the contents of the various pages to cover these various useful relations.

Sorry for this big text, I'm a bit over-complicating, but like to play with possible ideas.

All the best.

Juro

@moonoo2, might be the elegant idea I miss here. It's only I use section's entries to generate my menus. Thanks.

Ok so create a tag list field to select a page type that mimics a symphony page type maybe? ? I use section entries for pages too using url_router and tag pages with 'main' and 'footer' for instance.. then apply templates that listen for these rules with predicates.

nor do I want to have the entries two have different url

Why not? URLs should resemble navigation hierarchy, in my opinion.

The page is called company/team and I want it to also appear at contact/team but the link should visibly point at company/team so that search engines don't think it is duplicate content.

  1. Create a second page (contact/team) with the same data sources etc. from company/team.
  2. Leave the template for contact/team empty and instead just inlucde the template for company/team.
  3. Define a canonical link in your markup to prevent SEO snafus.

Hello juro, moonoo2 and jensscherbel,

I am impressed by all your ideas and I appreciate your help. This time, I only have one page to appear twice, so I will go an easy way. Jens' approach is both simple and I think you are right that the user should stay within the navigation section he is in. I will define a canonical link and done. The other solutions I will keep in mind for another time.

Thanks to you all Moritz

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