Join our DNN Community    (Newsletter, Tips, Tricks and Forums for DNN Skins & Modules)

 



Microsoft Gold Certified Partner - DNN Benefactor

Microsoft Gold Certified Partner

DotNetNuke Powered! 


Thursday, July 03, 2008 Register · Login · Contact · Search:  
Company Solutions Portfolio Contact
Forums
Blue Sky
Want something added to the ListX engine, or just can't wait to see what is in store for the future? Check out this forum and let us know what you think.
Subject: Reusable Snippets

You are not authorized to post a reply.   
Author Messages
myearwood
Middleweight
Posts:58

02/04/2007 11:40 AM Alert 
Hi all

This is an idea I've use in another environment. There is a need for a way to reuse small segments of code (snippets). For example, using the list format and the alternating list format - since the two are virtually identical, I could take this:

List Format
<tr class=DataGrid_Item>
<td>
<a onclick="return window.confirm('Delete this store?');"
{ACTION,[StoreID],DeleteStore,,Message}>
<img border=0 src="http://[ALIAS,System]/images/delete.gif"></a>
</td>
<td><a {ACTION,[StoreID],CurrentStoreID,Store Detail,Session}>[StoreID]</a>
</td>
<td>[StoreName]</td>
</tr>

Alternating List Format
<tr class=DataGrid_AlternatingItem>
<td>
<a
onclick="return window.confirm('Delete this store?');"
{ACTION,[StoreID],DeleteStore,,Message}>
<img border=0 src="http://[ALIAS,System]/images/delete.gif">
</a>
</td>
<td><a {ACTION,[StoreID],CurrentStoreID,Store Detail,Session}>
[StoreID]
</a>
</td>
<td>[StoreName]</td>
</tr>

and do do it like this:

List Format
<tr class=DataGrid_Item>[Snippet:StoreList]</tr>

Alternating List Format
<tr class=DataGrid_AlternatingItem>[Snippet:StoreList]</tr>

We'd only a place to define and maintain "Snippets". Possibly a new table and a new option on the ListX module?

Snippets Table
SnippetName, SnippetCode

"StoreList", <td>
<a
onclick="return window.confirm('Delete this store?');"
{ACTION,[StoreID],DeleteStore,,Message}>
<img border=0 src="http://[ALIAS,System]/images/delete.gif">
</a>
</td>
<td><a {ACTION,[StoreID],CurrentStoreID,Store Detail,Session}>
[StoreID]
</a>
</td>
<td>[StoreName]</td>

Then we could maintain such snippets in one place.

In the other environment, I provided support for parameters. That could be an enhancement to this later.

Mike
Talal
Middleweight
Posts:88

08/07/2007 3:42 PM Alert 
hmm check out this http://symphonyoffire.com/ListX/tabid/368/Default.aspx

It could help you in generating the tab without too much redundency
You are not authorized to post a reply.
Forums > Bi4ce.Modules.ListX > Blue Sky > Reusable Snippets



ActiveForums 3.6
 
Latest Post
 
At R2integrated (formerly Bi4ce), we take support seriously.  That's why we support our customers and DNN community with daily monitoring from our experienced engineering team.  We ask that the first step taken is to read the relevant documentation and support forums prior to submitting any questions that may already be available or have been answered.  We ask that you review the documentation that we provide for our products before posting a question.

The Forums are for our customers to chat, exchange ideas and strategies, and submit feedback.  Please be sure to perform keyword searches for previous related forum responses.

To be helpful when submitting a new item, please include the following: 
  1. DNN Version
  2. Module Version
  3. Admin Log Viewer Information
  4. Environment detail: Operating system, .NET framework version, database and version, IIS version, Browser version (if appropriate)
We always try to respond quickly and monitor the forums daily during business hours (EST).  Occasionally, requests for a specific project requirement may not apply for the free support offered. For project specific support please submit via our Information Request form.

Thank you for using our Forums.

Click here to register for the Forums
 
© 2008 by R2integrated (formerly Bi4ce) | DNN® is a registered trademark of DotNetNuke Corporation