Developer forum

Forum » Templates » Where can i find all the new DW8.2 tags?

Where can i find all the new DW8.2 tags?

Martin Nielsen
Reply

Hi DW,

 

Where on http://templates.dynamicweb-cms.com/ can i find all the new ninja templatetags that you demoed at the TechConf?

 

I've found some on : http://mri.developer.dynamicweb-cms.com/blog/2013/01/resources-from-new-template-features-in-dynamicweb-webinar.aspx

 

But Nicolai demoed a lot of other cool stuff in his Template Ninja session that i can't find anywhere.

 

// Martin

 

 

 


Replies

 
Nicolai Høeg Pedersen
Reply

Hi Martin

It is on its way. Some of the features has not been released until 8.2.2 2 weeks ago.

But here you go until we get the docs updated. Will hurry!
 

<div>

	 <!--@DwAddToAny.Small.HtmlEncoded()-->
    <hr />
    <!--@DwAddToAny.Small.UrlEncoded()-->
    <hr />
    <!--@DwAddToAny.Small.JSEncoded()-->
    <hr />
    <!--@DwAddToAny.Small.Raw()-->
    <hr />
    <!--@DwAddToAny.Small.Length()-->
    <hr />
    <!--@DwAddToAny.Small.StripHtml()-->
    <hr />
    <!--@If(DwPageName.Length()>3)-->
        <!--@DwPageName.Remove(3)-->...
    <!--@Else-->
        <!--@DwPageName-->
    <!--@EndIf-->
    <hr />
	<!--@DwPageName.Format(Name of this page: {0})-->
    <hr />
	<!--@DwPageName.Replace("Ho", "REPLACE-Ho")--><br />
    <!--@DwPageName.ToLower(tag1)--><br />
	<!--@DwPageName.ToUpper()--><br />
	<!--@DwPageName.StartsWith(Ho)--><br />
	<!--@DwPageName.Contains(om)--><br />
	<!--@DwPageName.EndsWith(Ho)-->
    </div>



<div>&nbsp;</div>
	<div>
	<!--@DwPageName--><br />
	<!--@If(DwPageName.Length()>5 || DwPageName.Length()<3 && DwPageName.Length()<3)-->
        <!--@DwPageName.Remove(3)-->...
    <!--@Else-->
        <!--@DwPageName.Format(<b>{0}</b>)-->
    <!--@EndIf-->

	</div>


<!--@Snippet(snippetName)-->

	<!--@SnippetStart(snippetName)-->
	<div class="dwcontent">
	slideshow
	</div>
	<!--@SnippetEnd(snippetName)-->

 

 
Martin Nielsen
Reply

Hi Nicolai,

 

Is there a standard substring function?

 

I'd like to do

<!--@TageName.Substring(3)-->

Is that possible without coking up some new extensions?

 

// Martin

 
Nicolai Høeg Pedersen
Reply

Hi Martin

 

Substring is not available as of now. You can use Crop which will remove characters after the specified index.

 

Just added substring though so you can use it from next hotfix.

 

It will have 2 options:

<!--@DwPageName.Substring(2)-->
<!--@DwPageName.Substring(2, 3)-->

 

 

The implementation in case you need it before

If Not String.IsNullOrEmpty(value) Then
							If arguments IsNot Nothing AndAlso arguments.Value IsNot Nothing AndAlso arguments.Value.Count > 0 Then
								Dim startIndex = Base.ChkInteger(arguments.Value(0))
								Dim length = If(arguments.Value.Count > 1, Base.ChkInteger(arguments.Value(1)), 0)
								If startIndex > 0 AndAlso value.Length > startIndex Then
									If length > 0 AndAlso length < (value.Length - startIndex) Then
										value = value.Substring(startIndex, length)
									Else
										value = value.Substring(startIndex)
									End If
								End If
							End If
						End If

 

 
Nicolai Høeg Pedersen
Reply

And by the way, you can upgrade to 8.2.3 and use Razor templates instead!

 

You must be logged in to post in the forum