ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Adding segment variables with php

January 12, 2010 6:27am

Subscribe [2]
  • #1 / Jan 12, 2010 6:27am

    sambo

    80 posts

    Hi,

    is is possible to trick EE into thinking that it has an extra segment variable with PHP ??

    I am thinking about a way to make the Structure plugin easier to use in multilingual sites.

    Lets say my site tree has:

    - mysite.com/articles   ( no language segment for default language )
    - mysite.com/se/articles
    - mysite.com/de/articles

    And then lets say I am using the same template in all the languages for the article page.

    My template will have to have conditionals all over the place because if we are on the default language then segment_1=articles, otherwise it is segment_2

    What I want to try out is to trick EE - and behind the scenes add a segment_1 variable that is not in the url in the default language.  Then all my templates will use segment_2 regardless of language.

    You may ask why I want to do this?? Why not use something like the methods suggested in the Wiki.  Well, I have used the Wiki methods with great success so I know them - but I just want to try this out.

    Best,
    Sammi

  • #2 / Jan 12, 2010 8:44am

    Wil Linssen

    49 posts

    Have you looked at Leevi Graham’s Multi Language?

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases