We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 12003
    • 21 Posts
    Hey, i m very new to MODX. i’m working on a site, which is developed in Modx,

    there is one navigation on the top which is coming form Wayfinder plugin, but now client wants me to add another navigation on the left side of the page, whenever i m creating any new resource(menu item), it is being added on the top(which i assume quite right)

    Do i need to another wayfinder ? or how ?

    pls help.. i m not a developer.


    Thanks,
    HC
      • 22427
      • 793 Posts
      You just need another Wayfinder Call, that is something like
      [!Wayfinder? &startId=`0` .... !]

      just on the place in your document’s template where you want to show the second menu.
      Using some of the parameters, you can control whichever ressources will appear in the menu or not. Styling is done via CSS.
      Regards
      ottogal
        • 12003
        • 21 Posts
        thanks, but i don’t understand,actually it seems to difficult to me.

        problem is like this:

        there is one top navigation on the top having 6 links which are working fine but some one who developed the site did not use wayfidner, he created it using hardcore php code( as he was a php dev).

        Now i want to create a single link on the top of the page(apart from the top navigation) and if i create a link( resource) from the modx manager, it adds the new link on the top navigation, which i don’t want.

        in simple i just want to create 1-2 links which i want to put some where on the page.
          • 3749
          • 24,544 Posts
          Quote from: hemchandra at Mar 15, 2010, 09:42 AM

          .. there is one navigation on the top which is coming form Wayfinder plugin

          .. there is one top navigation on the top having 6 links which are working fine but some one who developed the site did not use wayfidner, he created it using hardcore php code( as he was a php dev).
          I don’t see how these statements can both be true. It’s very likely that Wayfinder snippet (it’s not a plugin -- that’s something else) is being used for the top menu.

          in simple i just want to create 1-2 links which i want to put some where on the page.

          I’m afraid I can’t really tell for sure what you want or what you have on the site so it’s hard to help.

          The whole point of Wayfinder is to automatically show new documents on the site. If you don’t want particular documents in the top menu, you can do one of three things:

          1. Uncheck the "Show in Menu" checkbox when you create them (or edit them and uncheck it).

          2. User Wayfinder’s &excludeDocs=`nn,nn` parameter to prevent them from showing in the menu (where nn is the ID of each document you don’t want to show in the menu).

          3. Put them in a folder that is not under the one specified in the Wayfinder tag for StartID.



          If you just want a simple link to a document on the site, you can do this:

          <a href="[~nn~]">Link Text</a>
          (where nn is the ID of the document you want to link to).

          Hope this helps.


            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
            • 12003
            • 21 Posts
            M so sorry for the misunderstanding , though the problem is fixed now. i tried <a href="[~nn~]">Link Text</a> but i don’t want numeric values on address bar [~nn~]... how do i fixed that?

            one more issue i have one form & i m not using any inbuilt plugin for it.like eform. i have one php file which i want to call on submit. but whenever i submit form, page gets redirected to home page.

            my file structure is :

            1 : contact us page calling register template
            2 : register template have chunk {{registerprofile}} ( here i have html of form and form tag is written like : <form method="post" id="frm_contact" name="frm_contact" onsubmit="return validate_contactus();" action="[~[*registersubmit*]~]" >

            3 : [~[*registersubmit*]~] is a spinet where php code is written

            one more thing if i write snippet like action="[[registersubmit]]" it doesn’t work,page doesn’t open
              • 3749
              • 24,544 Posts
              Quote from: hemchandra at Mar 16, 2010, 08:27 AM

              M so sorry for the misunderstanding , though the problem is fixed now. i tried <a href="[~nn~]">Link Text</a> but i don’t want numeric values on address bar [~nn~]... how do i fixed that?

              one more issue i have one form & i m not using any inbuilt plugin for it.like eform. i have one php file which i want to call on submit. but whenever i submit form, page gets redirected to home page.

              my file structure is :

              1 : contact us page calling register template
              2 : register template have chunk {{registerprofile}} ( here i have html of form and form tag is written like : <form method="post" id="frm_contact" name="frm_contact" onsubmit="return validate_contactus();" action="[~[*registersubmit*]~]" >

              3 : [~[*registersubmit*]~] is a spinet where php code is written

              one more thing if i write snippet like action="[[registersubmit]]" it doesn’t work,page doesn’t open

              First of all, you need to learn a little more about MODx tags so you can ask questions clearly and understand what’s happening. Take a look at the site in my sig and at the MODx Wiki, especially this page: http://wiki.modxcms.com/index.php/Beginner%27s_Guide_to_MODx. There is also good information here: http://codingpad.maryspad.com/beginner-tutorials/.

              To get rid of the numbers in the address bar, you want to implement Friendly URLs: http://wiki.modxcms.com/index.php/Friendly_URLs_Guide.

              Your other problem is because [~[*registersubmit*]~] is not a calling a snippet, it is a link tag with a resource tag nested inside it. The resource tag probably is interpreted as a 0 since it doesn’t exist and you get sent to the error page, which by default is your home page.

              [[registersubmit]] is a snippet tag so either your registersubmit snippet doesn’t exist, it’s misspelled, or there’s an error in the snippet.

              You shouldn’t need a snippet at all, though, if you only have one registration page, just use action="[~nn~’]" with nn being the ID of the registration page.
                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
                • 12003
                • 21 Posts
                Thanks for the reply!

                i have already enabled the friendly URL setting & it works fine throughout the site. my problem was with the link you posted in your previous post <a href="[~nn~]">Link Text</a>, here the page is showing its id on the address bar, which is quite right , i guess. Is there any way i can customize it like <a href="[~contact us.html~]">contact us</a> ?

                if i write action="[[registersubmit]] " & browsed to register page,now the page is completely blank, there is nothing.

                i tried action="php/register.php", although, it opened the page, values get submitted but contact page get redirected to home page.

                also there is no misspellings, php code is right.


                pls help.

                • You need to assign each document an alias (or enable auto-generation of alias from the pagetitle). If there is no alias and auto-generation was not enabled (in the Configuration) then the document’s ID will be used. You must always use the document ID in the MODx tags; MODx will automatically generate the correct URL.

                  You must use a URL in the action attribute of a form; unless the snippet in question returns a valid URL you don’t use it. Rather, use [~id-of-document-that-has-the-snippet~]. You can also use the alias of the page without any MODx tags if you want to; and are sure that the alias will never get changed.
                  <form action="[~42~]" ...>

                  Or
                  <form action="contact.html" ...>
                    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
                    • 12003
                    • 21 Posts
                    well i m getting correct URL for every page except one, which is given an hard coded link like
                    <a href="[~20~]">Link Text</a>, it open the page like 20.html on address bar. i tried to give it a name like
                    <a href="[~contact us~]">Link Text</a>,but it doesn’t work.

                    Help will be appreciated!!!
                      • 3749
                      • 24,544 Posts
                      User the first version: [~20~]. Make sure the page has an alias and remember that Friendly URLs don’t show up when you preview from the Manager. Load in another browser where you’re not logged in to the Manager.
                        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