Project

General

Profile

How to get master / root project?

Added by O M almost 14 years ago

Hi,

is there a way to get the root project of current selected project?

e.g.:

Cars -> BMW -> 3.30i

I would need the project "Cars". Already tried to get it with the ancestor, but unfortunately couldn't manage it to work.
I am trying something like different templates for different root- projects. It is already working for the "current" project, but if you are working within a sub project, it is actually returning to the default template.

Thanking you in advance ;)

MfG


Replies (2)

RE: How to get master / root project? - Added by Felix Schäfer almost 14 years ago

your_project.root should give you the "highest" ancestor.

RE: How to get master / root project? - Added by O M almost 14 years ago

hmm, kk, too simple, thx, works just perfect ;)

    (1-2/2)