Search the FirstSpirit Knowledge Base
Hi,
Is there any function in FirstSprit API from which i can get the UID Path.
Example :
If Inside the Site Store having foder Internet.
Inside the Internet folder having folder parts
inside the parts folder having folder specification
inside the specification having folder about
i want UID Path of folder " about" like this root/Internet/parts/specification/about
i didt get any function in API since i have one requirement where i have to show UID path of each folder
Hello Saurabh,
if you got your folder you can use a combination of getParent() and getUid() and build the uid_path with a StringBuilder. For example:
uid_path = uid_path.append(element.getUid());
while(element.getParent() != null) {
element = element.getParent();
uid_path = uid_path.insert(0,"/");
uid_path = uid_path.insert(0,idp.getUid());
}
Best regards,
René Rednoß
Hello Saurabh,
if you got your folder you can use a combination of getParent() and getUid() and build the uid_path with a StringBuilder. For example:
uid_path = uid_path.append(element.getUid());
while(element.getParent() != null) {
element = element.getParent();
uid_path = uid_path.insert(0,"/");
uid_path = uid_path.insert(0,idp.getUid());
}
Best regards,
René Rednoß
Hello Saurabh,
do you need further help or did René's reply already help you? If so, it would be great if you marked his reply as "correct answer" so that other community users find the solution easily. If you have already found a solution by yourself, it would be very kind of you, if you posted it here.
Best regards
Tim