This funtion would only run on request, so it might take some time but not as long a me clicking through all the elements manually.
6. Where did I use this chunk/snippet? I often wonder, if a chunk is used in a resource or any other place. So it would be great to get a list like "where is this chunk used (if at all)?" Same for snippets. This could be triggered my a menu or by a context menu link of an element.
This is devilish to implement and would probably be slow -- but nice to have.
Just think of it as an "inspector palette" where all used elements of the resource/element that is just being edited would be listed. This way it could work with ANY editor – and should be an AJAX solution ("collect while write").
7. A quickedit inside the code like "quickedit this tpl-chunk that the getResources call I am working on right now is using".
Nice, but I can't imagine how to implement it, since there's no easy way to identify an element named in a tag, unless we changed the property syntax to something like &tpl=`{$myTpl}` or &tpl=``#myTpl; or forced everyone to use standard property names. The first one would be cool if it was optional, but it would break almost all existing sites.
Yes, that would be an awesome extension for TVs, Bob! And it would not slow the system more down then it already happens when you use getResourceField or fastField. [ed. note: mindeffects last edited this post 11 years, 11 months ago.]
14. Extend the MODX tag-syntax for direct resource fields access like the extra "fastField" does. I see such an ultraflexible solution inside the core. Creative freedom, you know.[/li
Do you mean something like [[*pagetitle? &id=`12`]] ? I think that would be relatively easy to implement, though it would slow down page loads somewhat, especially if it's extended to TVs. Or am I misunderstanding you?
Thank you for adding your ideas to mine!
Quote from: BobRay at Apr 07, 2013, 08:37 PM
Quote from: BobRay at Apr 07, 2013, 08:37 PMYes, that would be an awesome extension for TVs, Bob! And it would not slow the system more down then it already happens when you use getResourceField or fastField.
14. Extend the MODX tag-syntax for direct resource fields access like the extra "fastField" does. I see such an ultraflexible solution inside the core. Creative freedom, you know.[/li
Do you mean something like [[*pagetitle? &id=`12`]] ? I think that would be relatively easy to implement, though it would slow down page loads somewhat, especially if it's extended to TVs. Or am I misunderstanding you?
The parser is already processing the tags to check for output modifiers, so the overhead might be minimal.I think this overhead would really be minimal. But there could also be a special tag syntax for those "get the stuff somewhere else" tasks. The extra "fastField" uses such.
[[*introtext:default=`Introtext is empty`? &docId=`12`]]
The existing syntax rules already cover that. All output modifiers go between the field name and the properties.Am I the only one smelling a fine solution coming up? Sweat! Still I would prefer "&id" over "&docId".
[[*introtext:default=`Introtext is empty`? &docId=`12`]]
prepareTV: &id=+13 processTV: &id=++13 This reads as "+ = do more" and "++ = do much more".
- Where did I use this chunk/snippet? I often wonder, if a chunk is used in a resource or any other place. So it would be great to get a list like "where is this chunk used (if at all)?" Same for snippets. This could be triggered my a menu or by a context menu link of an element.
This is devilish to implement and would probably be slow -- but nice to have.
getObject('modChunk', array($nameAlias => $name));
Are you thinking of injecting a tag or code for the hit counter into the code of all snippets and chunks?