Search

Still got a problem with the standard system navigation as installed with the standard theme. The names of the menu-items change the right way but the url doesn't get the language prefix.

If I read well gunglien write on aug 18th that the navigation ds change automatically. That does it indeed.

Do I need to change something in the navigation template?

EDIT: even though I excepted that it works out of the box I solved it by changing the navigation template:

      <a href="{$root}/{@handle}/">

into

      <a href="{$root}/{item/@lang}/{@handle}/">

This way the language prefix is always in the link

How does the current page link works with more than one url parameter?

For example

www.domain.com/nl/product/category/name

has to change in:

www.domain.com/en/product/category-en/name-en

Also if I just type www.domain.com/en/product/category-en/name-en it results in a 404 but www.domain.com/en/product/category/name-en does work

Strange ... There shouldn't be any issues. At least I don't have any.

There shouldn't be any issues.

That gives me at least hope and probably I'm doing something wrong. But for what part aren't there issues?

I have URLs like you described (products/category-title/product-title) and they work fine.

There was a mixing of two data sources with the same required param. Not yet completely solved but got a clue where to change things.

To be more specific: I need to get only the products for a specific category. In the product section the category is a selectbox link. The selectbox link only returns the values for that language. In English the param $category got the English name and in that way doesn't match with the Dutch category name.

EDIT: Data source chaining did the trick, so there is a match on ID and not on name.

Glad to hear you fixed it.

Still got an issue with the current page link and the right path with 2 params

I've got a page with two url params: cat/prod

www.domain.com/cat displays a page with general information about that category from a the datasource ds-category

www.domain.com/cat/prod display information of a product in that cat from the datasource ds-products

I've put into the page template, but I've got lost at this point. This is my template:

<xsl:template name="plh-page-parameters">
  <xsl:param name="lang" />
  <xsl:variable name="country_handle" select="concat('handle-',$lang)" />
  <xsl:choose>
    <xsl:when test="$prod !=''">
      <xsl:value-of select="//ds-products/entry/name/@*[ name() = $country_handle ]" />
    </xsl:when>
    <xsl:otherwise>
      <xsl:value-of select="//ds-category/entry/category/@*[ name() = $country_handle ]" />
    </xsl:otherwise>
  </xsl:choose>
</xsl:template>

In the select of the product I've missed of course the category in the url. But I really dont see what select can do the trick.

Basically, I understand $ds-products returns the product and $ds-category returns the category.

This line:

<xsl:value-of select="//ds-category/entry/category/@*[ name() = $country_handle ]" />

Should be:

<xsl:value-of select="//ds-category/entry/name/@*[ name() = $country_handle ]" />

I think your wrote category instead of name.

But, to fix another bug, I'd rewrite it like this:

<xsl:template name="plh-page-parameters">
    <xsl:param name="lang" />

    <xsl:variable name="country_handle" select="concat('handle-',$lang)" />

    <!-- Category is always needed -->
    <xsl:value-of select="/data/ds-category/entry/name/@*[ name() = $country_handle ]"/>
    <xsl:text>/</xsl:text>

    <!-- If product exists, then it is needed -->
    <xsl:if test="/data/ds-products/entry">
        <xsl:value-of select="/data/ds-products/entry/name/@*[ name() = $country_handle ]"/>
        <xsl:text>/</xsl:text>
    </xsl:if>
</xsl:template>

@vladG Thanks, this works like charm

You're welcome.

Hello Vlad!

I just noticed Page LHandles (2.6.1) is not compatible with the latest version of Frontend Localisation (2.5). Since I saw the repositories related to the various multilingual extensions are in ferment nowadays (Languages, LaFlang detection gTLDs, Frontend Localisation, Multilingual Text Box, …), I was wondering if Page LHandles is currently in ferment as well and/or if there are other plans for it. Thank you!

Ohh, didn't know about that. I'll check it out. Can you please post an issue on GitHub and tell me exactly what's wrong?

Thanks.

Sure, of course! I just posted it. Thank you for your prompt reply!

vladG,

i have updated to the latest versions of the extensions:

Languages (1.2) LaFlang detection gTLDs (1.1) Frontend Localisation (2.5) Multilingual Text Box (3.2)

Everything works, but my datasource plh-page is empty..

  <plh-page>
    <page handle="" id="82">
        <item lang="fr" handle="" />
        <item lang="en" handle="" />
        <item lang="nl" handle="" />
    </page>
</plh-page>

In my sympages table i have plhh-fr, plht-fr, plhh-nl, plht-nl, plhh-en,plht-en with the handles and titles correctly.

Any ideas? Thanks.

Fixed in version 2.7.

It works like a charm, thank you!

VladG, thank you! You are in all our projects :)

Hello,
I'm using Flang Detection 1.1, Sym 2.3.4, Page LHandles 2.9, Frontend Localisation, Languages 1.2
I compiled the pages handles for the three languages (it,en,fr), but when I try to load a page with a lhandle, example is http://localhost/website/fr/accueil/ I get a 404.
The app seems to render pages which are requested through the general (not localised) url handle.

Thanks for any suggestion

Ok I managed to update to 2.3.6 and it works correctly...

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