using (var session = SessionBuilder.CreateOrReplaceOldestSession(login))
{
//this is the currently active project in the session
var selectedProject = session.SelectedProject;
var serverManager = session.ServerManager;
Label1.Text = "Project: " + selectedProject.Name + "<br>";
IProject proj = selectedProject;
List<string> pubList = new List<string>();
foreach (project.Publication.IPublicationTarget t in proj.PublicationTargets.ToList())
{
Label2.Text += t.Name + "<br>";
pubList.Add(t.Name);
}
project.Publication.IPublicationTarget target = selectedProject.PublicationTargets.GetByName(pubList[0]);
Label3.Text = "Guid: " + target.Guid.ToString()
+ "<br> Name: " + target.Name
+ "<br> project: " + target.Project
+ "<br> Session: " + target.Session
+ "<br> url prefix: " + target.UrlPrefix
+ "<br> Type: " + target.Type
+ "<br> <br><br><br><br>";
}
I was able to get every bit of information about the publishing target except for the directory path. If you know of a way to do that, please let me know.
Thanks a lot!
Nader
var element = (XmlElement)
folder.GetType()
.GetProperty("XmlElement")
.GetValue(folder, null);
var path = element.Attributes["Here you have to insert the name of the RQL attribute containing the path"].Value;
You have to check the log files for the RQL loading the publishing target to get the attribute containing the directory path,
as I don't know it off the top of my head.
Cheers
Jonas