• Menu to show allways 2nd level item and child#

  • ecastano Reply #1, 6 years, 10 months ago

    Reply
    I'm going to use modx to organize http://sabf.itba.edu.ar.

    It's a bilingual site (english / spanish, maybe portuguese too).

    My site structure is

    English
    --Section 1
    ---Subsection 1.1
    ---Subsection 1.2
    ----Subsection 1.2.1
    ----Subsection 1.2.2
    --Section 2
    ---Subsection 2.1
    ----Subsection 2.1.1
    ----Subsection 2.1.2
    --Section 3
    -- bla bla

    The same is for Spanish.
    Each language is a non published folder, so each Section is in fact a subsection.

    I need to show a menu, where the parent link is the section 'x' (2nd level).

    Example:
    If i'm in Section 1, i need to show section 1 and the subsection 1.x
    If i'm in SubSection 1.1, I need to show sectoin 1 and the subsection 1.1 and section 1.2
    If i'm in Section 1.2.2, I need to show Sectoin 1, subsecton 1.1, subsection 1.2 and subsection 1.2.1 subsection 1.2.2

    Obviously I'm not going to create as many templates as Parent Sections i have. I need to get somehow the second level item wherever i'm and show a menu with that ID as parent.

    I'm not going to die if I need to use 2 templates (one for each language).

    thanks in advance...

    ps: sorry about the explanation, but my english sucks... if someone wants to help me, i could explain this thing again.


  • rthrash Reply #2, 6 years, 10 months ago

    Reply
    :lol: c'mon now emi... your english isn't half as bad as my spanish!

    I'll write up a snippet for you soon to take care of it.


  • ecastano Reply #3, 6 years, 10 months ago

    Reply
    Don't worry about your spanish.. english is the language to know..
    i wrote my first snippet!!! it's to get the content of a template variable and show in a listing.. similar to the news listing!!! i will post it somewhere after cleaning the code.


  • Carsten Reply #4, 6 years, 10 months ago

    Reply
    @ tangent

    English, Spanish, Chinese ... at the moment

    So, Emi, you're not that far off.


  • Luis Reply #5, 6 years, 10 months ago

    Reply
    I also want to make a Spanish/English site, this will help me a lot too


  • ecastano Reply #6, 6 years, 10 months ago

    Reply
    done! if you need this, ask me about it.