This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 172180

Summary: New template variable ${filepath}
Product: platform Reporter: starnixsa <starnixsa>
Component: TemplatesAssignee: Martin Entlicher <mentlicher>
Status: NEW ---    
Severity: blocker    
Priority: P3    
Version: 8.2   
Hardware: All   
OS: All   
Issue Type: ENHANCEMENT Exception Reporter:

Description starnixsa 2009-09-14 14:35:42 UTC
Problem:
Unable to insert the path of a file as a template variable under Tools > Templates

Solution:
Create a new template variable called ${filepath} that can read the current path of the file under the project.
e.g. Source Files > system > application > newfile.php
${filepath} = "./system/application/";

There is currently no central documentation for IDE, Project and Template variables that can be used. The closest I
found was at http://wiki.netbeans.org/FaqTemplateVariables

Thank you!
Comment 1 jaisondaniel 2013-05-27 08:51:20 UTC
In older version I used some variable to get the file-path value But unfortunately I forgot the variable name. That was I tried 2-3 years back, Now I tried some names like "folder", "directory", "container", "path" but nothing works. either implement this or provide some alternative solution to get a file-path value via template variable. This will help us to manage the source with better template.

Thank You.
Comment 2 gromit190 2017-10-09 11:57:00 UTC
+1 This would be very useful