We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 23018
    • 353 Posts
    Quote from: BobRay at May 03, 2013, 03:57 PM
    Processing is cheap in OnDocFormSave, since it doesn't affect page loads in the front end. I doubt if you would notice the difference in saving time. I don't really understand your idea, though, because Resources don't have properties. I think you would have to either co-opt an unused resource field or use a TV. Maybe I'm misunderstanding you.

    You're right. They don't have properties. My mistake.

    A TV would be fine for resources. For everything else a property could be used.

    Is there any way to automatically set default properties for every new template, tv, chunk, snippet or plugin?

    I'll sum up what I believe wold be a very useful feature:

    --------------

    MODX Bookmarks

    Add a Bookmark Menu to MODX Manager. Every resource, snippet, plugin, template, chunk or file can be added to that list.
    Clicking on of these items will open that item in edit mode (for example "Edit Chunk"). For elements or resources we edit very often, this is much faster than navigating the tree.

    Bookmarks can be already be stored in the main menu by creating actions for these bookmarks.

    A better way to handle this would be a "bookmarks" plugin:

    New Bookmarks can be added to the actions list by setting a property or tv with the name "modx_bookmark" to true.
    Setting the value to false will remove the bookmark from out list.
    If we delete an element, the bookmark for this element has to be removed as well.

    --------------

    Thats it.

    Regards, pepebe

    Offtopic Question: Is there any way to change the hover event from the main menu? On smaller screen they tend to popup while moving the mouse towards the utility buttons (save, duplicate, delete, etc.). I'd rather open a menu with a single mouse-click (or a tab on a mobile device).


      Homepage: pepebe.de | MODX snippets (and other stuff) at github: https://gist.github.com/pepebe
      • 3749
      • 24,544 Posts
      Yes, that's absolutely possible, though it would take some time to create. There's nothing technically very difficult about it until you get to the part about adding bookmarking to the context menu in the trees. wink You didn't mention that, but it's bound to come up eventually.

      Note that it would work for Resources and Elements, but not for files -- since there's no obvious place
      to store the bookmark flag.

      I'll put it on my Extra Ideas list, though I think there are about 60 ideas on the list already. wink
        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
        • 28042 ☆ A M B ☆
        • 24,524 Posts
        The Dashboard comes with the "Recently Edited Resources" widget that has "view", "edit" and "preview" options for each item. I use it all the time. Although a top menu bookmark would be more convenient, as well as providing links to elements as well.
          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
          • 6629
          • 60 Posts
          Quote from: pepebe at May 03, 2013, 12:52 PM
          Is it possible to add and remove such actions with a plugin?
          I'm talking about bookmarks.

          Not exactly what you want, but it's a start:

          A dashboard widget which uses getResources to show links to resources with a checked bookmark-tv

          - Create a checkbox-TV and assign it to your Template
            Name:     bookmark
            Value:    yes==1
            Default:  0
          
          - Create a chunk
            Name:     bookmarkLink
            Content:  <li><a href="?a=30&id=[[+id]]">[[+pagetitle]]</a></li>
          
          - Go to Dashboard -> Dashboards -> Widgets -> Create new Widget
            Widget Name:    Bookmarks
            Widget Type:    HTML
            Widget Content: <ul>[[getResources? &parents=`0` &tvFilters=`bookmark==1` &tpl=`bookmarkLink`]]</ul>
          
          - Add the new Widget to your Dashboard
          
          - Have fun ^^

            • 23018
            • 353 Posts
            @.DasItsch: This is a nice concept.

            Could we build a link a menu in the system that displays a modal containing the content of a widget?

            This could free us from a lot of work because we could use things that are already there.

            Thank you.

            Quote from: DasItsch at May 04, 2013, 02:29 AM
            Quote from: pepebe at May 03, 2013, 12:52 PM
            Is it possible to add and remove such actions with a plugin?
            I'm talking about bookmarks.

            Not exactly what you want, but it's a start:

            A dashboard widget which uses getResources to show links to resources with a checked bookmark-tv

            - Create a checkbox-TV and assign it to your Template
              Name:     bookmark
              Value:    yes==1
              Default:  0
            
            - Create a chunk
              Name:     bookmarkLink
              Content:  <li><a href="?a=30&id=[[+id]]">[[+pagetitle]]</a></li>
            
            - Go to Dashboard -> Dashboards -> Widgets -> Create new Widget
              Widget Name:    Bookmarks
              Widget Type:    HTML
              Widget Content: <ul>[[getResources? &parents=`0` &tvFilters=`bookmark==1` &tpl=`bookmarkLink`]]</ul>
            
            - Add the new Widget to your Dashboard
            
            - Have fun ^^

              Homepage: pepebe.de | MODX snippets (and other stuff) at github: https://gist.github.com/pepebe