We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 7455
    • 2,204 Posts
    When i create a new weblink (in the menu) would it be posible for the parser to pars the content of the weblink?

    that way we can make the weblink dynamic. the reason I ask is that I am looking for a way to have my home page rotate random. with pages in a unpublished folder. Susan made a nice snippet that returs a random page from a selected folder so thats all i need if i can say this in a menulink:

    [~[[RandomDoc]]~]

    that way we get a lot of nice options for people like me that is not able to programm a snippet that gets all tv’s etc and puts it on a page.

    Greets Dimmy
      follow me on twitter: @dimmy01
      • 32241
      • 1,495 Posts
      Sorry of this is out of topic a littl ebit, but sombody mind to explain it to me, what is weblink? I couldn’t find the right documentation understand this further.

      Thanks
        Wendy Novianto
        [font=Verdana]PT DJAMOER Technology Media
        [font=Verdana]Xituz Media
        • 7455
        • 2,204 Posts
        a weblink is a hyperlink to an external (or internal) page that acts in the menubuiders like dropmenu as a document but instead of containing a document it will open a link.
          follow me on twitter: @dimmy01
          • 32241
          • 1,495 Posts
          That’s an accurate and simple answer that I’m looking for. I will give it a test then.

          Thanks
            Wendy Novianto
            [font=Verdana]PT DJAMOER Technology Media
            [font=Verdana]Xituz Media
            • 32963
            • 1,732 Posts
            Hi,

            If you log it then we will most likely add it smiley
              xWisdom
              www.xwisdomhtml.com
              The fear of the Lord is the beginning of wisdom:
              MODx Co-Founder - Create and do more with less.
            • Log it being as a feature request in the bugtracker ... wink
                Ryan Thrash, MODX Co-Founder
                Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
                • 7455
                • 2,204 Posts
                Quote from: rthrash at Dec 23, 2005, 02:23 PM

                Log it being as a feature request in the bugtracker ... wink
                Quote from: xwisdom at Dec 23, 2005, 02:09 PM

                Hi,

                If you log it then we will most likely add it smiley

                Done thanks
                  follow me on twitter: @dimmy01

                • Looking at a "weblink" document in the database (site_content), the two main differences are the "type" field, which for a weblink is "reference", and the "content" field, which is nothing more than a URL. The parser makes a quick check for "reference" type documents:

                  if($this->documentObject['type']=="reference") {
                    $this->sendRedirect($this->documentObject['content']);
                  }
                  


                  That’s all. So you could very easily use a plugin to make a dynamic weblink, by simply changing the $modx->documentObject[’content’] to whatever you want it to be.

                  Remember, one of our main goals is to make the core as clean and simple as possible. If a "feature" can be implemented with a module or a plugin, it shouldn’t really belong in the core. Far too many great ideas are totally destroyed by "feature creep".
                    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
                    • 32241
                    • 1,495 Posts
                    Quote from: sottwell at Dec 24, 2005, 08:39 AM

                    Remember, one of our main goals is to make the core as clean and simple as possible. If a "feature" can be implemented with a module or a plugin, it shouldn’t really belong in the core. Far too many great ideas are totally destroyed by "feature creep".

                    Agree with that, but one thing to note though, the future support of having nested MODx tag is really need to be supported on the core, which from I see at this point, the requested feature relate to nested MODx tag. I beliebe it will need to be supported by MODx soon or later in the future, and I believe when this feature was done, it will have a greater impact in the way how we deal with building MODx snippet, plugin, and etc...

                    As for now, your proposed solution to use plugin, I can’t be more agree to that solution. Thanks for pointing all of us to the right direction.

                    Regards,
                      Wendy Novianto
                      [font=Verdana]PT DJAMOER Technology Media
                      [font=Verdana]Xituz Media