Technical support This forum is closed.
Version 1.x > Technical support > Function GetPathLevel View modes: 
User avatar
Member
Member
calcat - 10/23/2006 11:16:08 PM
   
Function GetPathLevel
Hi,

I have reviewed quite a few posts regarding the use of the Function 'GetPathLevel' and 'GetAliasPath.'

these appear to be exactly what I need to use in order ot accomplish the functionality that I need. I have included the code in the .cs page:

c_event.SelectNodesPath = Functions.GetPathLevel(Functions.GetAliasPath(), 1) + "/%";

where c_event is the id of a CMS.Repeater

When I go to display the page in the web site I get this error:
Kentico.CMS.TreeEngine.Functions' does not contain a definition for 'GetPathLevel'

Both functions GetPathLevel and GetAliasPath are in the Functions.cs file that is located in my project under the App_Code folder.

What is going wrong?

User avatar
Member
Member
calcat - 10/23/2006 11:35:26 PM
   
Re: Function GetPathLevel
As an addendum:

As I stated earlier, those 2 functions are in the Functions.cs file under the App_Code folder. However, when I actually enter the code in the .cs page and get to "Functions." the intelisense does not show either function - the intelisense list is not the same as what is in that particular Functions.cs file.

So where is the intelisense list coming from and how do I get the .cs page to find the right funciton?

User avatar
Member
Member
calcat - 10/24/2006 6:31:00 PM
   
Re: Function GetPathLevel
Hi,

I guess I jumped in too quickly. After some more poking around, I figured out that I needed to include the "using WebProject;" in my list.

Sorry about that.