We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 27509
    • 22 Posts
    I’ve created several Weblink documents and I use NewsListing to display a list of links. All outgoing links are identified as being internal documents (which they are of course). Is there any way of rewriting the URLs so they will display as the actual URL the Weblink is pointing to? I am already using mod_rewrite to rewrite all other URLs but i can’t think of a way to achieve this with the weblinks.
      • 18397
      • 3,250 Posts
      This really should be looked into. Could you please post a bug/feature report at modxcms.com/bugs ?
        • 27509
        • 22 Posts
        Sure, Ill do that. Thnx.
        • Thanks for the reminder guys; I had actually discussed a solution for this with the team early on and it just got pushed back to the top of the list for me. I believe this will probably help sites score/rank higher with many popular search engines when deployed with MODx, since external links are important to such things. wink
            • 27509
            • 22 Posts
            SEO was the reason why I asked smiley
              • 9763
              • 16 Posts
              I have just added a weblink to a folder and find the same behaviour. Has there been any update on this since November?

              Basically, I am redeveloping our site using modx. The training section of the site was previously content managed and is quite specialised. I don’t want to incorporate it in modx. I just want to manage it separately and link to it from my modx managed site.

              So, I created a weblink document to make a link in my menu to the training section. The weblink works ok, but in my menu it shows up as http://www.mysite.com/services/training.htm. Clicking this does a 302 redirect to http://www.myoldsite.com/training/home.html

              Is it possible to have the link show up in the menu as http://www.myoldsite.com/training/home.html and skip the redirect?

              Failing that, is there a way to make the redirect a 301 instead since that is more search engine friendly?

              Thanks,
              fizzy
                • 2762
                • 1,198 Posts
                Quote from: Skipsel at Nov 11, 2005, 11:28 AM

                I’ve created several Weblink documents and I use NewsListing to display a list of links. All outgoing links are identified as being internal documents (which they are of course). Is there any way of rewriting the URLs so they will display as the actual URL the Weblink is pointing to? I am already using mod_rewrite to rewrite all other URLs but i can’t think of a way to achieve this with the weblinks.

                I’m not sure to understand...
                If you need newslisting displays the ’’real url’’ of the weblink ( for example a link to Google from your site display like www.google.com not www.yourdomain.com/google.html) you can use this chunk:

                <div class="summaryPost">
                <div align="left"> </div>
                <h3>[+title+]</h3>
                <div><a href="[+summary+]" target="_blank">[+summary+]</a></div>
                <br />
                <div>[+description+]</div>
                <br />
                </div>
                  Free MODx Graphic resources and Templates www.tattoocms.it
                  -----------------------------------------------------

                  MODx IT  www.modx.it
                  -----------------------------------------------------

                  bubuna.com - Web & Multimedia Design
                  • 9763
                  • 16 Posts
                  hi banzai,

                  thanks for replying.

                  i should have made myself clearer. i am not using the newslisting snippet.

                  my query is regarding the dropmenu display, but i thought that the behaviour of only showing the internal url for weblinks was common to all of modx - maybe i misunderstood?

                  basically, i have a folder services containing links to documents and a weblink to another part of my site not managed by modx.
                  when i use the dropmenu snippet to produce a navigation list for the services folder, i see my weblink but the url is the internal modx url (which redirects to the right place on clicking it via a 302 redirect).

                  i am wondering if it is possible to include the true destination url for the weblink in my navigation and skip the redirect altogether?
                    • 2762
                    • 1,198 Posts
                    Ok you can can use a little ’very stupid’ trick using friendly alias grin

                    for example

                    1) you have a static (no modx) externalpage.html page with path like www.youdomain.com/externalpage.html

                    2) create a modx weblink and put externalpage in document alias field .

                    3) that’s all laugh

                    I made a little example for you here:
                    http://www.tattoocms.it

                    click on postinfo link in drop menu - redirect to a postinfo.html static page
                      Free MODx Graphic resources and Templates www.tattoocms.it
                      -----------------------------------------------------

                      MODx IT  www.modx.it
                      -----------------------------------------------------

                      bubuna.com - Web & Multimedia Design