That would be really handy. I have a few snippets I use that could easily be converted to Plain HTML with this method. It would be really handy as shorthand for more comlicated html like embedded flash or PDF objects.
Quote from: rthrash at Aug 17, 2005, 09:56 AM
LOL
Raymond, that is too cool and too helpful!
lol
The problem here though Ryan is that once we start doing stuff like that we can no longer call those snippet’s "static" HTML blocks. They can even be made into none cacheable html snippet blocks
BTW, regarding "Access Permissions": Both Raymond and Ryan are correct. If a Snippet is set to execute in the manager, you have to possess the correct assignment to see the Snippet on the menu or to run it. On the frontend you have to have the correct assignment before the snippet executes or returns content.
Access Permissions are Document Groups and User Groups. So, for instance, if you have a User Group of "Editors" that gives special control and/or allows access to unpublished pages, you would set that Snippet to "Editors" and can place it anywhere on the site without having to worry about it be accessed by the wrong sort of folk.
Hopefully that makes sense to everyone...
Quote from: infoclipper
FWIW, I disagree-- nothing gets executed, it’s just substitution. To me, it’s just like how you can include another chunk of HTML by having a [[anotherTag]]. (Which we already allow.)
You’re correct nothing get’s executed it’s just subsituted or processed text. The point I’m trying to make here is that the output for some of these html snippets is directly dependent on their inputs. This means that the snippet’s output will vary based on the user’s input thus making it’s content dynamic.
-
MODX Staff
- 12,272 Posts
Maybe we need a slightly different terminology, or use "non-logic" HTML as the terminology.
Ryan Thrash, MODX Co-Founder
Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
Quote from: rthrash at Aug 17, 2005, 11:50 AM
Maybe we need a slightly different terminology, or use "non-logic" HTML as the terminology.
Well, IMO there are really two types of snippets - PHP Snippets and HTML Snippets. It does not get any simpler than that. PHP Snippets used php code to render an out while HTML Snippets uses text and placeholders to render an output.
Quote from: infoclipper at Aug 17, 2005, 12:05 PM
Which brings me back to the Properties tab. Would anyone mind too much if I tweaked the way it displayed/allowed input of the parameters? The way its stored is fine, but I would like to make the front end editing/addition a bit more polished. Sort of like how you can maintain the parameters once you’ve created them, but allow you to make them the same way. Shouldn’t change anything with the way they are stored in the DB or the operation thereof.
Any objections? 
I guess this is my call - No objections
FWIW, the original design is very restrictive but was the easiest way to get something going. It was design for codes not users which is kind of a bad thing to begin with.
What I also had in mind was to separate the jscripts from those pages into a javascript file to make it reuseable accross other manager pages.