We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 49635
    • 63 Posts
    Hello!

    Very interesting, how can I withdraw a link from the menu at any place?
    For example, there is such a code:

    
    [[!pdoMenu? 
     &parents=`967`
     &level=`0`
     &hereClass=`cur`
     &tplOuter=`@INLINE <ul class="total-price-links">[[+wrapper]]</ul>`
     &tpl=`@INLINE <li [[+classes]]><a href="[[+link]]">[[+menutitle]]</a>[[+wrapper]]</li>`
     &showHidden=`1`
    ]]
    
    


    And I need to display a link away from the template

    Other chunk ttt:

    <a href="[[+cur-link]]"></a>
    


    The point is to show when you click on the current element that is clicked
      • 28042 ☆ A M B ☆
      • 24,524 Posts
      For the sake of this discussion, let's say the the main menu is on page #1. When you click on a menu item - let's say a link to page #2.

      When you get to page #2, you want the secondary link to itself being shown? Like a breadcrumb trail?
        Studying MODX in the desert - http://sottwell.com
        Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
        Join the Slack Community - http://modx.org
        • 3749
        • 24,544 Posts
        Is that the current page? If so, you might want this:

        <a href="[[~[[*id]]]]"></a>


          Did I help you? Buy me a beer
          Get my Book: MODX:The Official Guide
          MODX info for everyone: http://bobsguides.com/modx.html
          My MODX Extras
          Bob's Guides is now hosted at A2 MODX Hosting
          • 49635
          • 63 Posts
          Quote from: sottwell at Sep 10, 2015, 04:53 AM
          For the sake of this discussion, let's say the the main menu is on page #1. When you click on a menu item - let's say a link to page #2.

          When you get to page #2, you want the secondary link to itself being shown? Like a breadcrumb trail?


          I clicked on the menu, but the menu is displayed next to where I clicked ...
          http://joxi.ru/Dr8KPPoTDzJBA6
            • 49635
            • 63 Posts
            No answers?
              • 46886
              • 1,154 Posts
              Well it just sounds like you want some link effects.

              Like if pdoMenu outputs 3 links, and you click on link 2, it "jumps" out, is that right? Like maybe a soldier jumping forward of the line?

              But you clicked on it. Do you want it to open and show the contents of it? Or after it jumps out will the page go to the linked page?

              If you say click and then jumps out, what else should happen? Nothing?

              It sounds like you want some js to make a cool effect but if the link is a new page then on refresh the effect will be gone and the soldier will be back in line.

              I think you can also target this with the 'hover' or 'active' pseudoclass in css.
                • 46886
                • 1,154 Posts
                Some tool to make the current/active link also available in another spot of the page...
                  • 28042 ☆ A M B ☆
                  • 24,524 Posts
                  <a href="#">[[~[[*id]]]]</a>
                    Studying MODX in the desert - http://sottwell.com
                    Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
                    Join the Slack Community - http://modx.org
                    • 49635
                    • 63 Posts
                    Quote from: nuan88 at Sep 13, 2015, 04:10 AM
                    Well it just sounds like you want some link effects.

                    I think you can also target this with the 'hover' or 'active' pseudoclass in css.

                    Thanks for the tip

                    First I did active at a click on the menu ...

                    Then I use jQuery to search for the selected field and replace to this name link...




                    Quote from: sottwell at Sep 13, 2015, 02:36 PM
                    <a href="#">[[~[[*id]]]]</a>

                    It works, but how do I translate the link at the right me transliteration?

                    Second, when you click any third party regardless of the menu item to add a title ... And it should be limited to categories menu ...

                    Perhaps the option of filtering will help ...
                      • 46886
                      • 1,154 Posts
                      Ok so let me see if I get your meaning.

                      "translate the link" means that now you have the right *words* to connect with the link you want, but no link there right?

                      Using this:
                      <a href="#">[[~[[*id]]]]</a>


                      This is a special function of Modx and quite handy. I think this should work:

                      <a href="[[~[[*id]]]]">[[~[[*id]]]]</a>


                      to provide both the right link and the right words.

                      Because I am pretty sure this will work if the page is defined: <a href="[[~25]]">My cool page</a>

                      And the extra stuff is to have a dynamic link,

                      <a href="[[~25]]"> becomes <a href="[[~[[*id]]]]">


                      The second thing you mention, I can't understand what you want, sorry its not clear at all. Third party? To add title? You lost me ;-)