Hi,
You can take advantage of
CMS.GlobalHelper.RequestStockHelper class which gives you ability to insert and get items into
HttpContext.Current.Items collection using
Add/GetItem methods. You can add a reference to a web part to the collection and retrieve it in the code of another web part.
Basically what you have to do is add a reference to the repeater in
onContentLoaded() method in
~/CMSWebParts/Viewers/cmsrepeater.ascx.cs file using command:
CMS.GlobalHelper.RequestStockHelper.Add("repeater", this);
Then you can retrieve the
Repeater web part in
btnNewDoc_Click() method in
~/CMSModules/Content/Controls/UserContributions/ContributionList.ascx.cs file and set its
Visible property to false like this:
if (CMS.GlobalHelper.RequestStockHelper.Contains("repeater"))
{
CMSAbstractWebPart repeaterWebPart = CMS.GlobalHelper.RequestStockHelper.GetItem("repeater") as CMSAbstractWebPart;
repeaterWebPart.Visible = false;
}
This way the articles in the repeater will not be listed while you are creating a new article.
Best regards,
Filip Ligac