SnippetMaster Support Forums

General => Suggestions & Feature Requests => Topic started by: eventide on January 18, 2010, 11:16:18 AM



Title: Nested snippets and including/excluding users
Post by: eventide on January 18, 2010, 11:16:18 AM
I have a couple of ideas for SnippetMaster that I think many developers would find very useful. I am fairly new to SnippetMaster, so I hope I'm not a) repeating something already brought up, or b) suggesting something that is already a feature!

Nested snippet tags
I have seen a couple of threads mentioning such a feature (but to my knowledge there are none in this suggestions forum). As developers, we are all familiar with the concept of nesting HTML tags and to me it seems very natural to expect to be able to do that to snippets. Nesting user rights, being the biggest reason. I'm wondering if this could be done by adding a name attribute to the EndSnippet tag to match the opening snippet tag it goes with:

Code:
<!-- #BeginSnippet name="Outer Snippet" users="user1" -->
    Some content here that user1 can edit, but user 2 cannot edit.
        <!-- #BeginSnippet name="Inner Snippet" users="user2" -->
            Some content here that both user1 and user2 can edit.
        <!-- #EndSnippet name="Inner Snippet" -->
    Some more content that user2 cannot edit.
<!-- #EndSnippet -->

This could be taken one step further to allowing multiple name values to the opening or closing tags so the developer can have that much more flexibility and control over who can edit what and how to specify it.

Explicitly including and excluding users
In setting up the rights for certain users and then determining what each can and cannot edit would be made so much easier, I think, if it could be specified in the snippet tag that a particular user is excluded from a specific section:

Currently, Admin, Power, and Super users have right to all snippets.

Code:
<!-- #BeginSnippet name="section 1" users="user1" -->
    Regular User Privileges is set to "Only if user is listed in the Snippet Tag access control list (ACL)", so user1 has to be specified here to be able to edit this section.
<!-- #EndSnippet -->

But what if I don't want a higher level user (or another custom user) to be able to edit a certain section for some reason? Create "include" and "exclude" attributes to specify each explicitly:

Code:
<!-- #BeginSnippet name="section 2" include="user1" exclude="Power" -->
    Admin and Super can still edit this section, and user1 since it's in the "include" attribute, but since "Power" is explicitly excluded, they cannot edit here.
<!-- #EndSnippet -->

That's my 2 cents...


Title: Re: Nested snippets and including/excluding users
Post by: admin on January 19, 2010, 06:31:09 AM
Some good ideas here.  I'll definately add those to the list of features to consider adding. 

Thanks!


Title: Re: Nested snippets and including/excluding users
Post by: eventide on January 19, 2010, 06:55:05 AM
Any chance on divulging when the next version may be coming out?  :D


Title: Re: Nested snippets and including/excluding users
Post by: admin on January 19, 2010, 07:16:32 AM
Unfortunately due to many many delays and various issues, I am no longer going to guess when the new version will be released.  :)


Title: Re: Nested snippets and including/excluding users
Post by: eventide on January 19, 2010, 07:23:46 AM
Fair enough, and thanks for your candor!

Delays are never fun - for you or us. Regardless, I look forward to when the next version will come out with great anticipation, whenever that may be...


Title: Re: Nested snippets and including/excluding users
Post by: admin on January 19, 2010, 07:45:24 AM
You bet.  :)  Be sure to sign up for the announcements mailing list here:

http://www.snippetmaster.com/news/

Cheers!