We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 32241
    • 1,495 Posts
    I was wondering, is it possible to hide certain options in QuickEdit? I know you can set this up on the plugin variables, but I was wodering, can we control it from the template or pages?

    I’m thinking of making a snippet call for each customized QuickEdit options. For example, if I create a page, and I want that page only to show option to modify content and longtitle, and that’s all, then I can call a config snippet for QuickEdit like this:
    [[QuickEditSetting? &opt=`content||longtitle`]]
    

    and I will place that snippet inside the page content or which field going to be pasted to the template.

    If I want this to apply to the whole template that I use, all I need to do is put this snippet call to the template. What do you think adam?

    So in QuickEdit Module, it will basically look for a global variables being set by this snippet, that contains the options, which needs to be displayed. The only thing that still a question on my head, does quickedit being rendered after the snippet execution or before? If after, than it’s great, if not, than there has to be a better way to do this.

    Keep up the reat work adam, because this is one of the module that attract most of us to use MODx after all.

    I’ll try to look into the quickedit core when I have time. If somebody know the code behind quickedit and want to give this implementation a try, than feel free to do so, and help adam to improve the quick edit module smiley

    Regards,
      Wendy Novianto
      [font=Verdana]PT DJAMOER Technology Media
      [font=Verdana]Xituz Media
      • 6726
      • 7,075 Posts
      Funny you mention this, I have been meaning to ask how I could hide unused content fields int the QuickEdit menu for some pages that contain only Tvs and no content field...

      But back on the issue : Wouldn’t the custom link method be the solution ?

      Though I fail to understand how many options are available through javascript, and I don’t know if you could select which item you want shown in the menu...

      Also I quote the doc :

      Can I hide the links from certain users ?
      Of course, this is done dynamically just set the permissions on the Template Variables like normal.
        .: COO - Commerce Guys - Community Driven Innovation :.


        MODx est l'outil id
        • 32241
        • 1,495 Posts
        Thanks David for pointing that out.

        It will be one of the alternative I believe. What I want is actually to have the quickedit menu that appear on the left top corner of the page to only show certain options based on each page configuration or each template configuration. From what I know, right now we can customize it, but it will be a global customization that will be enforced through out the pages on the same MODx installation. Imagine if we can move this configuration to just a snippet call.

        I don’t think not many people will need this functionality though, so I will try to work on this by myself.

        Thanks
          Wendy Novianto
          [font=Verdana]PT DJAMOER Technology Media
          [font=Verdana]Xituz Media
          • 1764
          • 680 Posts
          Hi guys, sorry I didn’t get to this sooner. Busy day.

          I’ll try to cover everything but if I miss something just ask me again.

          Wendy, I don’t think you can do what you’re looking to do without hacking QuickEdit but it would be a fairly simple hack. The list of built-in content that QuickEdit will show edit links to is defined in the QuickEdit module configuration. This vairable automatically get’s imported into the scope of the QuickEdit module and plugin as the $editable variable. If I were you I’d set up a template variable for quickedit fields and then just set $editable to the contents of that TV at the beginning of the plugin code.

          David, the custom link method relates only to the inline links not to the toolbar. Permissions can be used to hide certain template variables from certain users but that does not apply to built-in content. If you want to hide built-in content across the board you should be able to just remove them from the Editable Fields in the QuickEdit module Configuration tab.

          I hope that covers it. Please let me know if you have any further questions.
            • 6726
            • 7,075 Posts
            Thanks Adam, that covers it for me.

            I never checked in the QuickEdit module configuration tab. Now is the time to have a look then smiley

            Anyway, I can tell you my clients clearly like and value QuickEdit, just so you know ! It’s a big "turn on" for demonstrations as well grin

              .: COO - Commerce Guys - Community Driven Innovation :.


              MODx est l'outil id
              • 32241
              • 1,495 Posts
              That’s what I’m talking about, when the master come, everything is solved with no hassle at all.

              Thanks for the tips Adam.

              David, it’s a big turn on for me too. That’s the first thing that catch my eye, while looking for a solid CMS system to work on.
                Wendy Novianto
                [font=Verdana]PT DJAMOER Technology Media
                [font=Verdana]Xituz Media
                • 6726
                • 7,075 Posts
                I looked into it. Unless I got it wrong, it’s not in the Module configuration but in the plugin itself :

                if(!isset($editable)) { $editable = 'pagetitle,longtitle,description,content,alias,introtext,menutitle,published,hidemenu,menuindex,searchable,cacheable'; }


                I could edit those and have only the editable TVs fields available for the page that only have TVs as editable content.

                But then I’ll loose the traditionnal content links for the other pages, even those who include editable content fields...

                Anyway, I just wanted to avoid my client editing fields that are not in use for the catalog pages that only have editable TVs. It’s more a "foolproof" concern than a real demand.

                In other words, what I wanted was exactly what HideEditor does but for QuickEdit.
                  .: COO - Commerce Guys - Community Driven Innovation :.


                  MODx est l'outil id
                  • 1764
                  • 680 Posts
                  Quote from: davidm at Jan 10, 2006, 10:04 PM

                  I looked into it. Unless I got it wrong, it’s not in the Module configuration but in the plugin itself :

                  Actually, now that you mention it, well... that depends. There is no good way to upgrade module confirugration so that line in the plugin is a backup in case of an upgraded installation that would not have the Editable Content in the module configuration. Does that make sense? Basically if you don’t see it in the module configuration you can set it here or add a configuration parameter with the name editable to the QuickEdit module.

                  Quote from: davidm at Jan 10, 2006, 10:04 PM

                  In other words, what I wanted was exactly what HideEditor does but for QuickEdit.

                  If you want to customize what’s shown based on document or template then you’ll have to do something like what I mentioned to Wendy.

                  It seems like this feature is something that is wanted by more than just a couple people so I’ll talk to some of the other devs about a good solution.
                    • 32241
                    • 1,495 Posts
                    I second to your response Adam.

                    How about adding one more function, such as allowing us to add a custom link into the top menu?

                    The use case will bee, when I have setup a page with newspublisher to allow user creating a page for news for example. I want the ability in the news page to show the link that the user able to click and be directed to the admin page for inserting news page.

                    What do you think?
                      Wendy Novianto
                      [font=Verdana]PT DJAMOER Technology Media
                      [font=Verdana]Xituz Media
                      • 1764
                      • 680 Posts
                      That sounds like a great idea to me. Unfortunately, it probably won’t be available for a while. The plan is to eventually make the QuickEdit toolbar and links 100% javascript with an "API" that would allow you to add or remove links. Hopefully that’ll be coming in the next release but I can’t make any promises.