We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 18654
    • 191 Posts
    I’m not sure if this is where Revo feature requests go, if there is a better spot let me know.

    I think it would be nice to have a TV Type "Advanced URL" which would offer additional options such as "Target" attribute and a text field for the text that would actually show up in the link - and possibly other options like "rel", "id" and "class". Basically, something similar to what the WYSWYG’s have. The TV output would be the entire anchor tag - Open tag with attributes including href + Link Text + closing tag.

    Currently, I have to make three TV’s to accomplish this:

    1. LinkURL (URL TV)
    2. OpenInNewWindow (Yes/No Radio Option)
    3. TextToShow (Text field that contains the visible text that the users will click on)

    I supposed I could just use an RTE for links, but that seems like overkill plus there’s usually extra tags generated that I don’t want.

    I realize that there is a "Link Attributes" field in the resource, but for most end users typing in target="_blank" is very intimidating and hard to remember.

    -matt
      God does not save those who are only imaginary sinners. Be a sinner, and let your sins be strong, but let your trust in Christ be stronger, and rejoice in Christ who is the victor over sin, death, and the world.
      • 17883
      • 1,039 Posts
      I`m not using Revo yet, but a quick view in the docs shows something you might be interested in:

      http://svn.modxcms.com/docs/display/revolution/Template+Variables

      The subsections:

      Adding a Custom TV Input Type
      Adding a Custom TV Output Type

      seem to be what you`re looking for.
        • 25663 MODX Staff
        • 12,272 Posts
        Indeed, a custom plugin to grab the field and replace it with an appropriate format and you’d be done. Great idea and best of luck.
          Ryan Thrash, MODX Co-Founder
          Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
          • 17883
          • 1,039 Posts
          Ryan, in Revo it doesn`t need a plugin if I understand the docs correctly.
            • 25663 MODX Staff
            • 12,272 Posts
            I was referring to transforming the link attributes field into something more useful. A custom TV would work just as well.
              Ryan Thrash, MODX Co-Founder
              Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
              • 18654
              • 191 Posts
              Thanks for the responses! I’ve checked out the docs for creating a custom TV - it looks a bit challenging, but I really need to learn this stuff anyway. At some point I’m going to need to learn to create custom back-end forms to interact with custom DB tables, so I’ve got to start learning how to modify stuff in the manager area.


                God does not save those who are only imaginary sinners. Be a sinner, and let your sins be strong, but let your trust in Christ be stronger, and rejoice in Christ who is the victor over sin, death, and the world.
                • 22303 MODX Staff
                • 10,725 Posts
                Quote from: rthrash at May 13, 2010, 07:49 AM

                I was referring to transforming the link attributes field into something more useful. A custom TV would work just as well.
                Actually, to avoid confusion, plugins are NOT recommended for creating custom TV’s in Revo. You should use the custom TV approach in Revo.
                  • 28215
                  • 4,149 Posts
                  Quote from: OpenGeek at May 13, 2010, 02:14 PM

                  Quote from: rthrash at May 13, 2010, 07:49 AM

                  I was referring to transforming the link attributes field into something more useful. A custom TV would work just as well.
                  Actually, to avoid confusion, plugins are NOT recommended for creating custom TV’s in Revo. You should use the custom TV approach in Revo.

                  I think he meant for processing the custom TV’s input, which would be one way of doing it, if you’re not having your custom TV store its values in a hidden input.
                    shaun mccormick | bigcommerce mgr of software engineering, former modx co-architect | github | splittingred.com