Giter VIP home page Giter VIP logo

instanttemplates's Introduction

EPiServer Instant Templates

Description

Allows editors to create their own re-usable templates directly from within EPiServer edit mode.

More information:

Features

  • Create blocks and pages from a template.

How to get started?

Install-Package InstantTemplates

Add InstantTemplates in Startup.cs

public void ConfigureServices(IServiceCollection services)
{
    services.AddInstantTemplates();
}

Next, initialize InstantTemplates in the Configure method. This will add InstantTemplates to your application and Optimizely.

public void Configure(IApplicationBuilder app)
{
    app.UseInstantTemplates();
    ...
}

When you start the site and go to Edit Mode you'll be able to add the InstantTemplates Gadget there, create new templates based on a block or page (this can be structure into folders etc), and then use the templates in a similar fashion as when creating a new page in the content tree (there's a new from template option there now).

Changelog

Changelog

Disclaimer

The code used to extend the editor interface is not an approach supported by EPiServer and it is not guaranteed to work with future releases. Please use at your own discretion. We will however do our best to keep it up-to-date with the latest version of EPiServer

Package maintainers

https://github.com/frederikvig

instanttemplates's People

Contributors

ana-jovanovic avatar frederikvig avatar imgbotapp avatar ivanrakovic avatar milosmih92 avatar patkleef avatar sarbis avatar yungis avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

instanttemplates's Issues

UI Configuration

I've tried this add-on in two sites: One an unaltered, fresh Alloy site, Two an Alloy site that has had content modified and other add-ons installed (PowerSlice, SiteAttention, to name two).

In the first case, the template management UI shows up alongside Media and Blocks as a new "tab," if you will.

In the second case, I had to add the template management UI as a Gadget.

While I think the first case is the intended behavior, it should at least be consistent.

Love the add-on!

Deeper template structure

One hidden feature I really loved is that if you're creating a template with children - the structure follows when you're creating a template based on the parent page!

However this is not supported in the Instant Templates UI. It would be really great if I could create a template page child to an existing template page.

Bug with Commerce

WHen you install it with a commerce site the catalog management stops working
screen shot 2015-08-16 at 8 22 13 pm

[Marketplace] Create new content from template link on Global toolbar does not work

  1. Select a page from page tree
  2. Click (+) from global toolbar
  3. Select "New From Template" option

Expected: Available templates should be list for creating new
Actual: Empty list, error "Unable to load /EPiServer/InstantTemplates/Stores/…ates/?dojo.preventCache=1573527140253 status: 500" under Console

Server Error in '/' Application.
ContentReference string cannot be null/empty
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: EPiServer.Core.EPiServerException: ContentReference string cannot be null/empty
Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
Stack Trace:
[EPiServerException: ContentReference string cannot be null/empty]
EPiServer.Core.ContentReference..ctor(String complexReference) +109
EPiServer.InstantTemplates.InstantTemplatesStore.Get(String id) +304
lambda_method(Closure , ControllerBase , Object[] ) +104
System.Web.Mvc.ActionMethodDispatcher.Execute(ControllerBase controller, Object[] parameters) +14
System.Web.Mvc.ReflectedActionDescriptor.Execute(ControllerContext controllerContext, IDictionary2 parameters) +157 System.Web.Mvc.ControllerActionInvoker.InvokeActionMethod(ControllerContext controllerContext, ActionDescriptor actionDescriptor, IDictionary2 parameters) +27
System.Web.Mvc.Async.<>c.b__9_0(IAsyncResult asyncResult, ActionInvocation innerInvokeState) +22
System.Web.Mvc.Async.WrappedAsyncResult2.CallEndDelegate(IAsyncResult asyncResult) +29 System.Web.Mvc.Async.WrappedAsyncResultBase1.End() +49
System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeActionMethod(IAsyncResult asyncResult) +32
System.Web.Mvc.Async.<>c__DisplayClass11_0.b__0() +58
System.Web.Mvc.Async.<>c__DisplayClass11_2.b__2() +228
System.Web.Mvc.Async.<>c__DisplayClass11_2.b__2() +228
System.Web.Mvc.Async.<>c__DisplayClass11_2.b__2() +228
System.Web.Mvc.Async.<>c__DisplayClass7_0.b__1(IAsyncResult asyncResult) +10
System.Web.Mvc.Async.WrappedAsyncResult1.CallEndDelegate(IAsyncResult asyncResult) +10 System.Web.Mvc.Async.WrappedAsyncResultBase1.End() +49
System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeActionMethodWithFilters(IAsyncResult asyncResult) +34
System.Web.Mvc.Async.<>c__DisplayClass3_6.b__4() +35
System.Web.Mvc.Async.<>c__DisplayClass3_1.b__1(IAsyncResult asyncResult) +100
System.Web.Mvc.Async.WrappedAsyncResult1.CallEndDelegate(IAsyncResult asyncResult) +10 System.Web.Mvc.Async.WrappedAsyncResultBase1.End() +49
System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeAction(IAsyncResult asyncResult) +27
EPiServer.Shell.Services.Rest.RestControllerBase.EndExecute(IAsyncResult asyncResult) +38
EPiServer.Shell.Services.Rest.RestHttpHandler.EndProcessRequest(IAsyncResult result) +28
System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +576
System.Web.HttpApplication.ExecuteStepImpl(IExecutionStep step) +132
System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +163

[Marketplace] Can not create block from template

  1. Select a folder under Block gadget
  2. Open option context menu

Expected: Able to see "New from template" option for creating new block from template
Actual: Do not see "New from template" option

Categorical Breakdown of Templates

Would like to see a categorical breakdown of available templates in the template selection page. Broken down by top-level folder would be nice.

Pages tree/Folders tree don't display correctly when create a new page/block by click (+) button on Global toolbar

  1. CMS site with EPiServer.InstantTemplates.1.1.0 installed
  2. Go to Edit view, edit any block
  3. Click (+) button on the Global toolbar to create a new page/block
    Expected: Page tree/Folders tree should display to determine where the newly created item is layed on
    Observed: Only Template Root folder displays
    This issue doesn't happen if EPiServer.InstantTemplates.1.1.0 is not installed for site

[Marketplace] Content of template tree still not be clean up after uninstalling

  1. Uninstall Instant template 1.0.0
  2. Clean solution, build project
  3. Open Site
  4. Go to Admin mode > Set Access Right

Expected: Template folder tree are clean up.
Actual: Do not see on Edit mode, but still see it on content tree of Admin mode (see attachment). In manage websites when searching content with keyword "template", exception "Content with id '126' is of type 'EPiServer.Core.ContentFolder' which does not inherit required type 'EPiServer.Core.PageData'"

image

[Marketplace] Can not create page from template under content which is created newly from template

  1. Select a page-1 from page tree
  2. Open option context menu > select New from template
  3. Select a available template to create child-page1, do some actions on this page (editing, publish...)
  4. Open option context menu of child-page1 > select New from template under child-page1

Expected: Available templates should be list for creating new one
Actual: Empty list, can not create new page from template. Have to refresh browser then it will be worked.

Instant Templates Created and Published dates

Hi,

I have a question regarding “Created” and “Published” dates when creating a page from a template.
I have tested this in an alloy example site and I will try my best to describe it.

This is my test template:
image

When I create a page based on my template:
image
image

The question is: right now the “Published date” & “Created date” is the same dates as the template page, maybe this is how it is supposed to be ?

Is it possible for me to get a new “Published date” & “Created date” for this new created page based on the time when it was first created and published ?
image

Thank you in advance!
/Soria

Template is always created with the same parent

If I create a new template page below "About us" everything works as expected.
bild
Now if I try to add a new template below "Alloy Meet"
bild
...it still gets added to "About us".
bild

It seems that the parent source won't update unless I reload the entire page and I cannot figure out why myself.
We've seen a few bug reports for this on our site.
Your work is much appreciated and thanks for an otherwise great plugin!

The InstantTemplates doesn't work anymore

Hi,

The InstantTemplates doesn't work anymore and throws this error, how can I investigate this, I tried googling to understand the problem but it doesn't work, do you have any idea why this is happening or how to fix it.

image

Thanks and regards,

Upgrade to Optimizley CMS 12

Hi,

This is an great plugin and I would love to see an upgrade to support ASP.NET Core / CMS 12. What are your plans to support Optimizley 12?
Thank you.
Kind regards, Lucas

Integrate with Projects

It would be really great if Instant Templates had a tighter connection with Projects.

If I want to create some content from a template, and I'm not in "projects mode", I should have a checkbox where I can automatically create a project where these pages are added.

This would be a big improvement if I'm creating a template page with children and want to publish all at once.

[Marketplace] Can not open template page/block when using double click

  1. Select Templates gadget > TemplateRoot
  2. Double click to open a template is listed under lower pane

Expected: Above template page/block should be opened well
Actual: Nothing happens, can not open by double click. User has to select "Edit" option from Options context menu to open page/block template

Instant Template in multiple languages scenario

Hi,
We're having some issues when using Instant Template in multiple languages scenario. We will have more than ten languages in our website.
We have created the Template in Swedish and translate it to English.

The scenario is:

  • When we create a page in English language from instant template, it will create the page in Swedish and English ( unpublished ), and when we publish the English version, it will require to publish the Swedish version first ( master language ) which is we don't want, we only want to have the English page only.
  • Then it seems we need to create the template in English, and because we have many languages, it will be a bit tough to create all that template again in different languages.

Thanks and regards,

InstantTemplates url:s

Hi,

I have a problem with the template created link:
If I create a page from a page-template the generated url become the url of the template page, meaning the new page doesn’t get a new page url, it create a problem when we create another page and it get the same url as the first one, double name in our url:s , error in the Episerver Interface, is there a way to fix this ?

image

image

image

Browser Refresh Required

Appears as though a full browser refresh is required after creating a template in order for it to appear in the template selection list.

Labels when adding new templates

Im not sure where/if I can control this... after installing InstantTemplates, when I try to add a new template, both add options display 'New Block':

image

The second link is for pages. Is there a way I can update this? Like in a language file maybe?

Available Instant Template options are not updated with each attempt to create a new page

When selecting "New From Template" for the first time the call is made to the InstantTemplatesStore controller to get the possible template options based on the allowed content types for that parent page. However, when selecting "New From Template" from a different parent page, the InstantTemplateStore controller code is not recalled. So it is only loading allowed template types from the parent page that it received from the first call. This is an issue due to the fact that the second page could have different allowed content types than the first, so they need to be retrieved again.

Available Instant Templates screen does not scroll when adding 'New from Template'

If you have a lot of templates they flow of the bottom of the screen with no way to reach them. By comparing to the standard new page functionality it looks as though the elements needs a height set with the overflow then set to auto.

In the standard Episerver content panes the widths and heights look to be set in script and tracked on resize, I'm not familiar enough at the minute with some of the epi classes and dojo attach points to know what they hook on to. But looks like in Instant Templates your trying to set the height as 100% and it doesn't appear to work to allow the scroll.

Tested using Chrome.

[Marketplace] Layout is not nice

  1. Install CMS site EPiServer.CMS.Core version=11.13.2, EPiServer.CMS.UI version="11.22.1" with Instant template addon
  2. Create new content from template

Expected: Layout should be displayed nicely
Actual: On Creating page, Input name field is not nice (see screenshot)

image

[Marketplace] Have to refresh site to see new template from list

  1. Add new page template then publish (or restore new one from trash)
  2. Go to page tree, select "Start" node > add new page from template
  3. Observer available template list

Expected: All templates are listed, includes template at step 1
Actual: Only old templates in list, do not see any newly created/restored templates. User has to refresh browser by Ctrl F5 or Logout/login to see completely. See screen record on title link
Note that if has only few templates, issues does NOT happen.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.