Pages: [1] |
|
|
Author |
Topic: Embedded snippet tag (Read 751 times) |
graphmap
Posts: 6
|
Can you have embedded snippet tags. Lets say I want the whole page to be available for editing by admin and super accounts and within this, page regions for regular accounts. So, my proposed structure would be:
<!-- #BeginSnippet name="Whole Page" --> .. non defined for admin and super accounts
This is for the whole page
<!-- #BeginSnippet name="Region1" users="someone" -->
This is for a defined regular user (or users) and is limited to a specific block
<!-- #EndSnippet -->
Close the Region1 edit area
<!-- #EndSnippet -->
Close the Whole Page edit area
Or do I have to open and close each Snippet area as separate blocks so that the admin and super users can access every edit region as a separate areas, while the regular user only sees the block his account entitles him/her to.
|
|
|
|
admin
Forum Administrator

Posts: 2686
SnippetMaster Author
|
Very interesting... you are talking about "nested" Snippet Tags, right?
I've never tested this, to be honest, and I don't know if it will work or not. Best thing to do is try it out and see how it goes.
I think the only problem might be with how the software "finds" the snippet tags. It will not display the file in the drop-down box for selection unless a "matching" snippet open and close tag are found.. and I'm not sure if having two opening snippet tags will be considered valid, since it will expect a closing snippet tag right after the opening one.
Best thing is to try it out on a sample page and see if it works.
Let me know...
|
|
|
|
graphmap
Posts: 6
|
No, the nested tags won’t work. What happens is that the first instance of Begin Snippet triggers the region for the admin and super users in my example, and ends with the first instance of End Snippet. The regular user doesn’t get access to the page.
Another point with snippet placement is how they work with template files, i.e., the “dwt” files used with Dreamweaver. The snippets have to be nested within the “Begin Edit” and “End Edit” tags/notations. With Dreamweaver (and I suspect other html editing applications) if one wanted to give a user access to the whole file with a snippet, then the code would have to be:
<body>
Begin Edit Region
Begin Snippet
End Snippet
End Edit Region
</body>
Since my Dreamweaver templates protect the navigation menus I’ll accept the fact that only actual content will be available through Snippetmaster and, I believe that what its intended to do.
|
|
|
|
admin
Forum Administrator

Posts: 2686
SnippetMaster Author
|
Yes, exactly. SnippetMaster was originally intended to only allow specific editable regions (snippets) to be editable.. just like dreamweaver templates.
The next version of Snippetmaster (or possibly the one after that) will allow dreamweaver templates to be used as snippet tags. So a DW template will just "plug in" to snippetmaster, with no need to add Snippet Tags. The dreamweaver template tags will be used instead.
|
|
|
|
|
Pages: [1]
|
|
|
|