Currently I'm working on relations between Variations and Sources and Pages.
10 approaches got booted out of my head cause of non logic between them.
I'd use SQL but then my MS-ADC would slap me. ;) So I have to use "standard".
The current approach is looking nice (so far)...
"A lot of garbage I'm staring in, but sometimes I find some news of tomorrow."
Screenshots of the full solution are provided here (soon tm)
CODE SNIPPETS:
How to Access the Hidden List:
SPContext.Current.Site.RootWeb.Lists[new Guid("PUT YOUR LIST GUID HERE")].GetItems(YOUR QUERY);
You need to Provide the List's GUID to access it, U2U CAML Query or Sharepoint Explorer allows you to access this Information.
You can expect: The ObjectID, no Title, and the GroupID
foreach (SPListItem itm in SPContext.Current.Site.RootWeb.Lists[new Guid("PUT YOUR LIST GUID HERE")].GetItems(YOUR QUERY))
{
// Another Funny thing, the object ID is an URL! So take care.
using(SPSite nSite = new SPSite(itm["ObjectID"].ToString().Split(',')[0]))
{
using (SPWeb nWebs = nSite.OpenWeb())
{
if (itm["ObejectId"] != null) // yes put everything else string prove and so on here too, and a count etc.
{
// Yes, nOriginItem is a SPListItem
nOriginItem = nWebs.GetListItem(itm["ObjectID"].ToString().Split(',')[0]);
}
}
}
}
With the Item you can create PublishingPages and co and do what you like.
// Enjoy