lpt addin template in a TDL template

Posts   
 
    
omar avatar
omar
User
Posts: 569
Joined: 15-Oct-2004
# Posted on: 08-Oct-2006 11:27:46   

FRANS said that I can create an LPT template to reteive project properties (like the project name). 1- Can I have an example of such a template (preferable in VB.NET) 2- how to use the LPT template as an addin template in a TDL template?

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39786
Joined: 17-Aug-2003
# Posted on: 08-Oct-2006 11:40:07   

The .lpt template:


Public ReadOnly Property ProjectName
    Get
        Return <%=_executingGenerator.ProjectDefinition.ProjectName%>
    End Get
End Property

You then bind that to a templateid in a templatebindings file, say Include_ProjectName and use that templateid as an include statement inside a TDL template:


' your TDL code here

' include the .lpt template
<# Include_ProjectName #>

Frans Bouma | Lead developer LLBLGen Pro