Template directive: inPath

The @inPath checks if the current request url has a parent address which is supplied within the @inPath() directive. If the parent address matches, the second argument supplied will be returned. The example below shows how the @inPath() directive can be applied in template files
inPath
Examples with assumed test pages
  Assumed Page 2: http://localhost/docs/some/page
  @inPath('docs.some', 'hi')  returns "hi" 
  
  Assumed Page 1: http://localhost/docs/resource/item 
  @inPath('docs.some', 'hi')  returns "" 
                  
Example - Integrating domUrl with inPath
  <a href="@domurl('docs/resource')" class="@inPath(':dom-path','active')"> 
  <a href="@domurl('docs/users')" class="@inPath(':dom-path','active')"> 
                  
In the code above, active will be returned once the relative @domurl() path is visited. This happens because the :dom-path will automatically test for the last path supplied on @domurl, saving us the time to rewrite urls. This behaviour is good for navigation bar menus. Also, for this to work, the @inPath() must come immediately after @domurl() directive is used. Now it even gets easier when only one argument is supplied. If it is only one single argument supplied on @inPath(), then @inPath will automatically call the :dom-path argument on itself. This can save a lot of time when building web applications. This means that the code above can be rewritten as shown below

Example 3 - Smart integration of @domurl() with @inPath()
  <a href="@domUrl('docs/resource')" class="@inPath('active')"> 
  <a href="@domUrl('docs/users')" class="@inPath('active')">