SnippetMaster Support Forums
Return to main website
 
September 19, 2009, 08:19:29 AM
* Show unread posts since last visit.
* Show new replies to your posts.
Welcome, Guest. Please login or register.
Did you miss your activation email?
September 19, 2009, 08:19:29 AM

Login with username, password and session length
Search:  
Advanced search
* Home Help Search Login Register
SnippetMaster Support Forums  |  General  |  How To's & FAQs  |  Topic: Embedded snippet tag « previous next »
Pages: [1] Print
Author Topic: Embedded snippet tag  (Read 751 times)
graphmap

Posts: 6


[-] Embedded snippet tag
« on: February 20, 2007, 04:16:47 AM »

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.   
Report to moderator   Logged
admin
Forum Administrator
*
Posts: 2686

SnippetMaster Author


WWW
[-] Re: Embedded snippet tag
« Reply #1 on: February 20, 2007, 11:46:49 AM »

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...  Smile

Report to moderator   Logged
graphmap

Posts: 6


[-] Re: Embedded snippet tag
« Reply #2 on: February 20, 2007, 07:56:11 PM »

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.
Report to moderator   Logged
admin
Forum Administrator
*
Posts: 2686

SnippetMaster Author


WWW
[-] Re: Embedded snippet tag
« Reply #3 on: February 20, 2007, 08:42:19 PM »

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.

Smile 
Report to moderator   Logged
Pages: [1] Print 
SnippetMaster Support Forums  |  General  |  How To's & FAQs  |  Topic: Embedded snippet tag « previous next »
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.10 | SMF © 2006-2009, Simple Machines LLC Valid XHTML 1.0! Valid CSS!