Hi Team,
I created a page and I included sample widget there but its not showing there.
I written my code below, can you check and verify once what mistake I done there. Thansk
using System;
using Telligent.Evolution.Extensibility;
using Telligent.Evolution.Extensibility.Api.Version1;
using Telligent.Evolution.Extensibility.Content.Version1;
using Telligent.Evolution.Extensibility.Security.Version1;
using Telligent.Evolution.Extensibility.Urls.Version1;
using Telligent.Evolution.Extensibility.Version1;
namespace Telligent.Test.Widget.Extension
{
public class TestApplicationType : IApplicationType, ITranslatablePlugin, INavigable
{
IApplicationStateChanges _applicationState = null;
ITranslatablePluginController _translations = null;
#region IPlugin Members
string IPlugin.Name
{
get { return "Test Appl"; }
}
string IPlugin.Description
{
get { return "Community Member Test ApplicationType."; }
}
void IPlugin.Initialize()
{
}
#endregion
#region IApplicationType Members
Guid IApplicationType.ApplicationTypeId
{
get { return ContentTypes.ApplicationId; ; }
}
string IApplicationType.ApplicationTypeName
{
get { return _translations.GetLanguageResourceValue("ApplicationTypeName"); }
}
void IApplicationType.AttachChangeEvents(IApplicationStateChanges stateChanges)
{
_applicationState = stateChanges;
}
Guid[] IApplicationType.ContainerTypes
{
get { return new Guid[] { Apis.Get<IGroups>().ContentTypeId }; }
}
IApplication IApplicationType.Get(Guid applicationId)
{
return Apis.Get<IApplications>().Get(applicationId, applicationId);
}
#endregion
#region ITranslatablePlugin Members
Translation[] ITranslatablePlugin.DefaultTranslations
{
get
{
var t = new Translation("en-US");
t.Set("ApplicationTypeName", "test");
t.Set("page-members-custom", "Sample User Page");
t.Set("page-members-custom-description", "Shows a page at the url members/{username}/custompage.");
t.Set("UserNotFoundException", "User {0} not found.");
return new Translation[] { t };
}
}
void ITranslatablePlugin.SetController(ITranslatablePluginController controller)
{
_translations = controller;
}
#endregion
void INavigable.RegisterUrls(IUrlController controller)
{
controller.AddPage("page-custom", "custom", null, null, "page-custom", new PageDefinitionOptions()
{
DefaultPageXml = @"<contentFragmentPage pageName=""page-members-custom"" isCustom=""false"" layout=""Content"" themeType=""0c647246-6735-42f9-875d-c8b991fe739b"">
<regions>
<region regionName=""Content"">
<contentFragments>
<contentFragment type=""Telligent.Evolution.ScriptedContentFragments.ScriptedContentFragment, Telligent.Evolution.ScriptedContentFragments::0a176676-40f8-484e-aaf6-6935ecb6ff44"" showHeader=""False"" cssClassAddition=""no-wrapper with-spacing responsive-1"" isLocked=""False"" configuration="""" />
</contentFragments>
</region>
</regions>
<contentFragmentTabs />
</contentFragmentPage>",
TitleFunction = () => _translations.GetLanguageResourceValue("page-members-custom"),
DescriptionFunction = () => _translations.GetLanguageResourceValue("page-members-custom-description"),
});
}
}
}
