Hi Shanison, Snippets get rendered into the page as a piece of html. So in the resulting page you can not easily identify where a piece of html came from. This is perfectly fine in deployment.
But during development and debugging it's tremendously useful if you can clearly indentify the origin of the diverse parts of the resulting html. Obviously you could add comments on top and below of every snippet like <!-- begin mysnippet --> mysnippet goes here <!-- end mysnippet --> That's somehow like a manual printf style of debugging. And you will have the comments in the rendered page even in production There's another problem with that: that style of begin/end comments is not a container. So a better approach would be to manually insert something like <div class="mysnippet"> mysnippet </div> around every snippet that you write. But then again, I dont't want to have that extra div (or span or whatever) when running in production mode. And interposing a div will disturb the css selectors. (This probably will also be a problem with the <r:snippet> markup) Actually this is a problem with all systems that assemble html from components. Maybe someone else on the list might want to add a solution as well. On 6 Mai, 03:46, Shanison <lxsh...@gmail.com> wrote: > I don't quite understand why you need to put a 'mode' for snippets. You > wanna show the snippets according to different mode? All the snippets are at > one place and has a name, so i don't understand when you are saying "It > would tremendously ease finding the respective snippet when looking > at the rendered page." Maybe can explain more? Or anyone else can answer?