geta / geta-optimizely-extensions Goto Github PK
View Code? Open in Web Editor NEWA comprehensive list of various extension methods improving your productivity for Optimizely sites.
License: MIT License
A comprehensive list of various extension methods improving your productivity for Optimizely sites.
License: MIT License
add extensions method to be indexed, something like this:
ContentIndexer.Instance.Conventions.ForInstancesOf<Product>().ShouldIndex(_ => true);
clientConventions.ForInstancesOf<Product>().IncludeField(x => x.MyMethodThatCallsGetFriendlyUrl());
have site configuration as follows:
Commerce content(products and also categories)
product.ContentLink.GetFriendlyUrl()
returns null
product.ContentLink.GetFriendlyUrl(product.Language?.TwoLetterISOLanguageName)
returns null
for all products/all languages when indexed using Search and Navigation indexing job
In other scheduled jobs this product.ContentLink.GetFriendlyUrl(product.Language?.TwoLetterISOLanguageName)
does return correct Url.
While CMS content:
articlePage.ContentLink.GetFriendlyUrl(articlePage.Language?.TwoLetterISOLanguageName)
returns correct Url in ALL scheduled jobs
Also maybe it would be good to have:
product.GetFriendlyUrl()
so that no language is needed to be passed in when you have content already
How to reproduce:
Is there possible to include also port in the URL?
We have cases when content was deleted in Optimizely, but not reindexed in find and we trying to get the URL of the removed content.
Is it possible to return an empty string for that case? So we won't need to handle the error at our level.
How to reproduce:
Feature Request:
Add Null Helper Attributes to IsNullOrEmpty or similar methods.
With CMS 12 and .NET 6 we are able to build projects that are defined as using nullable reference types. This is also the default for any new .NET 6.0 project. With this in mind, we can decorate input and output parameters on methods that allow the code analysis engine to understand if something is potentially null and encouraging null checking/handling within custom code.
e.g.
public static bool IsNullOrEmpty(this ContentReference contentReference)
{
return ContentReference.IsNullOrEmpty(contentReference);
}
Could be declared as
public static bool IsNullOrEmpty([NotNullWhen(false)] this ContentReference? contentReference)
{
return ContentReference.IsNullOrEmpty(contentReference);
}
Since the IMetadataAware
interface has been removed from .NET 6 this no longer works and the OnMetadataCreated() method is never called.
Background: http://blog.emikek.com/reinstating-imetadataaware-in-asp-net-5-vnext-mvc-6/
options is not used in call:
public static IEnumerable GetChildren(this ContentReference contentReference, LoaderOptions options) where T : IContentData
{
if (contentReference.IsNullOrEmpty())
{
return Enumerable.Empty();
}
var repository = ServiceLocator.Current.GetInstance<IContentLoader>();
return repository.GetChildren<T>(contentReference);
}
after i installed this package i got this error on startup:
System.TypeLoadException
HResult=0x80131522
Message=Could not load type 'EPiServer.Shell.Navigation.Internal.NavigationOptions' from assembly 'EPiServer.Shell, Version=12.0.1.0, Culture=neutral, PublicKeyToken=8fe83dea738b45b7'.
Source=EPiServer.Cms.AspNetCore.Migration
StackTrace:
at EPiServer.Shell.ShellConfigurationInitialization.ConfigureContainer(ServiceConfigurationContext context)
at EPiServer.Framework.Initialization.Internal.ModuleNode.<>c__DisplayClass4_0.b__0()
at EPiServer.Framework.Initialization.Internal.ModuleNode.Execute(Action a, String key)
at EPiServer.Framework.Initialization.Internal.ModuleNode.ConfigureContainer(ServiceConfigurationContext context)
at EPiServer.Framework.Initialization.InitializationEngine.ConfigureCurrentModules(Boolean final)
at EPiServer.Framework.Initialization.InitializationEngine.ConfigureModules(IEnumerable`1 modules)
at Microsoft.Extensions.DependencyInjection.ServiceCollectionExtensions.AddCmsHost(IServiceCollection services)
at Microsoft.Extensions.DependencyInjection.ServiceCollectionExtensions.AddCms(IServiceCollection services)
at Microsoft.Extensions.DependencyInjection.ServiceCollectionExtensions.AddCommerce(IServiceCollection services)
at Valtech.Kb.Cms.Startup.ConfigureServices(IServiceCollection services) in C:\Projects\KB\Webprogram\Valtech.Kb.Cms\Startup.cs:line 80
Have to use IHtmlHelper
and fix issues.
I tried replacing HtmlHelper
with IHtmlHelper
but functionality is broken afterwards
https://github.com/Geta/geta-optimizely-extensions#editbutton-attribute
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.