Quote from: xwisdom at Dec 20, 2005, 02:45 PM
I’m are not trying to create another Smarty or template language system. What I’m trying to do is make things a little easier for template designers. We don’t need smarty at this point. These tags are are just some simple swicthes that outputs a value based on a condition.
I agree with you. I don’t think we need smarty either, at least not as the default. If someone wants to work on creating a parser for smarty or any other templating engine I think that would be a great feature to offer but not as a core default.
And I realize that these are very simple tags at this point, I just want to make sure it’s not the first of what will become an overly complicated templating engine which will steal away the simplicity of MODx templating. It’s a slippery slope and I could throw out a few hundred other "why not this too"s and they all make sense individually, but when you’re done you have an overly complicated beast on your hands.
Most CMSs have gone down that road and I think they’re mostly worse-off for it. I was around or PostNuke’s new templating engine that was the beginning of the end for them (if you ask me). Yes it was way more powerful than the old header/footer templates but it was so complicated that nobody wanted to take the time to learn it or use it. I just want to make sure the same thing doesn’t happen to us.
Quote from: xwisdom at Dec 20, 2005, 02:45 PM
I would not want to use widgets for this purpose as it would require several widgets or a more complicated structured.
These tags will not get in the way of any designer. They either use it or leave it alone. Besides they reuire a few lines of codes. No huge byte size or processing overheads. The way I see it they will be processed much faster that Widgets (similar speed when compared to placeholders).
Personally I don’t see the harm in having serveral widgets for those who want to use them. Let’s keep it modular and not put things in the core for a slight performance gain. If we start loading easily modular code in the core for performance reasons then there’s no end in sight and we’ll end up with a bloated core.
If the problem with having "several widgets" is that they are confusing or get in the way then let’s find a better way to organize widgets instead of putting what could easily be a widget in the core.
Quote from: xwisdom at Dec 20, 2005, 02:45 PM
Before we decided to rule against these conditional tags lets ask ourselves how easy is would be for a developer/designer to secure a section of his/her page?
Posible solution:
1) Use Placeholder to output the value when the user logins - Content is not visible in design mode
2) Use a widget to output the text or a chunk - Requires from php and API knowledge
3) User a TV to output the value and use @EVAL to test if user is logged in
4) Use the new [[:IF-LOGIN]] tag - no need for php or a widget or a tv. Just a simple logical tag.
[[:IF-LOGIN? &then=`Your access code is 9649-223423-2323`]]
Personally I still don’t see why we don’t just package a bunch of widgets to accopmlish this same thing and keep them out of the core. Yes it will be a LITTLE bit more processing when they are used but it will be less for all of the pages where they’re not used (which would be most pages I’d think).
Is this:
[[:IF-LOGIN? &then=`Your access code is 9649-223423-2323`]]
any simpler for a designer than this?
[[IF-LOGIN? &then=`Your access code is 9649-223423-2323`]]
Overall I’m not as adament about this as I probably sound. It’s probably just a red flag for me because of my PostNuke days and seeing how their overly complicated templating system (which they raved about for a year before it came out) started a slow leak of users that’s never been patched.
Wow that was long. I think I need to get back to work beore it get’s any longer