Our blog contains the activity stream of Orchard Dojo: general news, new resources or tutorials are announced here.

Featured tags

IIS
API
SMS
SEO
All tags >

This week in Orchard - 08/30/2019

Let's start our post with a new contribution from Lombiq about back-porting Orchard Core's Live Preview feature to Orchard 1.x. Then read about two demos of Orchard Core's upcoming huge features: the Azure Blob Storage as CDN and about supporting custom Lucene analyzers! We also have other updates around our house as well. Check out our current post for more! On Orchard 1.x Demos Live preview feature A new Orchard module is available in Orchard 1.x, called Content Preview. This is the back-port of the Live Content Preview feature that you can meet within Orchard Core. To use the Content Preview feature, head to the Modules menu from the admin and enable the module. The main concept is the user wants to see the changes of a content item immediately somehow without needing to save the changes. Here you can see a Page content type with several parts attached. Here you can update the TitlePart, the BodyPart, and the LayoutPart too with a TextField and a NumericField. You can also have more than one TinyMCE editor in the editor of the content item, it will work without issues. If you edit a content item with invalid data (for example typing some text in the editor of a NumericField), you will see the error notification immediately in the preview window. In the live preview window, you can find a warning message: "The Content Preview feature doesn't support properties where there are relationships to ContentPartRecord (e.g. Taxonomies, Tags). These won't update in the preview windows but otherwise, keep working." You can see this message because this feature hasn't been implemented yet, but feel free to have a contribution and add this feature to the Content Preview in Orchard 1.x! Thank you for the contribution to Milán Keszthelyi from Lombiq Technologies! On Orchard Core Add more detail step on README.md of OpenId In the documentation, there are more steps about how to add the relevant identity of OpenId when using MMC.exe. New Orchard Core collaborators & teams in GitHub There is a new OrchardCore Devs team in the GitHub repository of Orchard Core. The members of this team now have wright access to the repository, they can merge PRs, create and delete branches, but can't merge to master. They contributed enough and with good quality that we can trust them now. They learned how to contribute to Orchard. :) Demos Azure Blob Storage as CDN We don't want to serve the Azure Blobs directly by rendering their own URLs that points to their Blobs. So, the clients load the Azure Blob directly and not us. We want Orchard to load the Blob, save it locally on the server and we serve the file directly. This file, which is copied locally from the Blob Storage is what we call the Media Cache. We do that because if we want an actual cache, that the clients don't ask us to serve a file, we will use a CDN which Azure Blob Storage is not and by doing that we can process the files to resize them if they are to be resized by ImageSharp. So, there are two things to solve here. For example, if you would like to show an image on your page with three different sizes, there are three requests coming for the same image with different sizes. But there is only one Blob on Azure. You just send one request to Azure to get the file, store it locally and then resize it to the three different pipelines and serve the three different files, which are cached by ImageSharp also. There is a cache of the Blob file in the Media Cache, and there is three cached, resized images from ImageSharp. This Purge Media Cache button under the Configuration -> Media Cache section is responsible for delete the Media Cache, not the ImageSharp cache. This feature is still under development. Supporting custom Lucene analyzers and additional Lucene indexes settings In the Lucene Indices settings page, you can now have an Edit button for each index. If you click on Edit, you can set the content types and also have an option to index a draft version of the content item. Before - by default - it was indexing everything, not just the ones we want. And - by default -, it was only indexing the published versions, without an option to index draft. If it's checked, it will still index one content item, but the latest version. When we index and tokenize the text, we need to tokenize based on the language. Using the Analyzer Name select list you can provide different language analyzers for each index. If the text of these items will be French, then you can use a French analyzer. This feature is still under development. On Lombiq Improving your employment security with Orchard Did you know that the Employment Security Department of Washington State also uses Orchard? Well, they do and thanks to them we've back-ported the Orchard Core live content preview feature to 1.x! See our post about it: https://lombiq.com/blog/improving-your-employment-security-with-orchard Migrate from Bitbucket Mercurial repositories to Git - we can help! Do you need help after Bitbucket dropping Mercurial support? If you want to move to Git, check out this page in our website about what are your options now. We've been doing hg-git conversion for six years! Orchard Dojo Newsletter Now we have 92 subscribers of the Lombiq's Orchard Dojo Newsletter! We have started this newsletter to inform the community around Orchard with the latest news about the platform. By subscribing to this newsletter, you will get an e-mail whenever a new post published to Orchard Dojo, including This week in Orchard of course. Do you know of other Orchard enthusiasts who you think would like to read our weekly articles? Tell them to subscribe here! If you are interested in more news around Orchard and the details of the topics above, don't forget to check out the recording of this week's Orchard meeting!

This week in Orchard - 07/19/2019

New Media Library web search providers for Orchard 1.x, improved documentation, and demo about the ability to set localization cookie when using the Content Culture Picker in Orchard Core. Read our post for the latest news around Orchard! On Orchard 1.x Demos New Media Library web search providers If you navigate to the modules, you will see some new ones in the Media category: now you can have Bing, Google, and Pixabay web search providers! Let's enable them and see how you can use it. For any web search provider that you would like to use you need to have an API key and provide them to Orchard under Settings -> Media. Now head to the Media Library and hit Import. Then select Web Search from the list to get the Search text box and a select list near that. Here you can use those web search providers, that you have provided an API key for. For example, let's choose Pixabay. If you select one or multiple files and hit the Import button, the selected files will be downloaded and Orchard puts them in the folder you have previously selected. Thank you for the contribution to Milán Keszthelyi from Lombiq Technologies! On Orchard Core Role-based permissions to display admin menus In the following GIF, you can see two admin menus (admins only and contributors only). Their visibility is configured from the roles page. If you logged in as an administrator, you can see both, but if you are a contributor you can only see one of them. Being able to see an admin menu doesn't mean you can see everything inside it, of course, normal permissions still apply. For example, a contributor can see the link menu, but can't see the content types links if they don't have the right permissions for them. Consuming Content Parts and Fields using C# For a while now it's possible to get strongly typed versions of Content Parts and Fields using Orchard Core. Thank's to John Rom, he wrote great documentation about how you can do that! Demos Content Culture Picker - Add ability to set Localization Cookie Last week we wrote about the Content Culture Picker feature of Orchard Core. The Content Culture Picker module helps you to manage cultures for the frontend and now comes with two now options you can set. If you enable the Content Culture Picker module, you can head to Configuration -> Settings, where you will see a new option, called ContentCulturePicker. Here you can decide to set the localization cookie when switching between cultures (this is enabled by default) and to redirects to the homepage of the target culture if the ContentItem of the target culture does not exist. The documentation is also updated about how to set the cookie from the admin site of Orchard Core or by using a recipe step. On Lombiq Orchard Dojo Newsletter Now we have 80 subscribers of the Lombiq's Orchard Dojo Newsletter! We have started this newsletter to inform the community around Orchard with the latest news about the platform. By subscribing to this newsletter, you will get an e-mail every time when a new post published to Orchard Dojo, including This week in Orchard of course. Do you know of other Orchard enthusiasts who you think would like to read our weekly articles? Tell them to subscribe here!

This week in Orchard - 06/14/2019

In our post you could read a demo about the GraphiQL explorer improvements. But first, check the other new features of the admin site of Orchard Core and the new docs too! Check out our post for more! On Orchard Core Add Codemirror Liquid editor to Autoroute Pattern setting Now when you edit the AutoroutePart using the admin site you have a liquid editor to provide the pattern used to render the custom URL of the content type. Fix content picker width with breakpoint and making the content items reorderable If you edit a content type that has a content picker, you will see that now the picker has a correct width when displaying the screen in different sizes. You can also reorder the picked items by using a simple drag-and-drop. Furthermore, if you hover your mouse over the picked items, you will see the changes of the cursor. Extend Facebook Documentation The OrchardCore.Facebook module has finally been merged to the dev branch! It's also got updated documentation about the Facebook Social Plugin Widgets and about what are the available settings when you would like to register a Facebook App with your Orchard Core site. If you are interested in this module, we have written about it a few weeks ago! Add documentation for overriding Views New documentation has been added to the ReadTheDocs page of Orchard Core about how to override existing views that come from modules in your theme. Add View button to media library items Now when you navigate to the Assets and select or hover over a media library item, you will see a new view button under each item in order to preview the file and easily copy the URL. Demos GraphiQL and GraphiQL explorer improvements Last week we showed the new GraphiQL explorer. Since then, the explorer has got some new features. First of all, it now allows filtering and returning of the localization part data. Until now we don't currently have a way to expose a list of all the media assets stored in the media library so please welcome the new mediaAssets query to return the available assets. This is useful when using Orchard as a headless CMS with for example Gatsby to statically compile images into the website. In the screen above you can see a query to list every item from a folder called Backgrounds. You will notice a new property of every content type, called Render. If you check the box near render and run the query you will get the following result. The render property of the blog post, in this case, will show you how will a blog post be rendered. This is a full HTML of the page with a title and everything. This is exactly like you would have if you look at the source code of the page in the browser when opening the given blog post. Let's see how does it work! The assumption was that it should be very easy to render a shape and the way it was done was more complex than necessary. The render property rendering the shape from build display of the content item with any display types. You just need to call the displayHelper.ShapeExecuteAsync! That's all you need to do from a shape to render it. In GraphQL this works in the following way: using (var sw = new StringWriter()){ var htmlContent = await displayHelper.ShapeExecuteAsync(model); htmlContent.WriteTo(sw, HtmlEncoder.Default); return sw.ToString();} So just call displayHelper.ShapeExecuteAsync and pass a shape to it to get the IHtmlContent which can be written to a TextWriter! On Lombiq Orchard Dojo Newsletter Now we have 72 subscribers of the Lombiq's Orchard Dojo Newsletter! We have started this newsletter to inform the community around Orchard with the latest news about the platform. By subscribing to this newsletter, you will get an e-mail every time when a new post published to Orchard Dojo, including This week in Orchard of course. Do you know of other Orchard enthusiasts who you think would like to read our weekly articles? Tell them to subscribe here! If you are interested in more news around Orchard and the details of the topics above, don't forget to check out the recording of this week's Orchard meeting!

This week in Orchard - 05/10/2019

In our post, we would like to give you a walkthrough about how to use the localization files in Orchard Core. With the localization files, we will see the brand new RTL support and close our post with the new attached media field! On Orchard Core Demos Use localization files To get localization files you can go to the documentation of Orchard Core, where you will find the link called localized. This will navigate you to the Crowdin page of Orchard Core. At the upper right corner of the page, you will find a button to download translations. Download this ZIP file and extract the Localization folder to your App_Data folder. You can see that we have one folder for each language. These will come NuGet packages at some point. If you have a running site you have to restart it, because these files will be found and loaded only on startup. The next thing to do is to enable the Localization module, that provides support for UI localization.After that you should head to Configuration -> Settings -> General and add the supported cultures for the site. Here we added to cultures (Arabic and French) to the list of the supported cultures. If we set the default culture to French and hit Save, you will see the localized Settings page. RTL support Now because in the previous demo we added Arabic to the list of the supported cultures we can see the RTL support. Set Arabic as the default culture and hit Save. Now everything is translated in Arabic and everything is on the right. It automatically picks up the RTL logic from the current culture and all the CSS have custom properties to render differently based or not on RTL flags. In the following screen, you can see the Assets page using the Arabic culture. The Assets.json file has a new property called generateRTL. If you set the value of this property to true, this will process the CSS files to generate a new rule specifically for RTL by inverting all the margins and the paddings and the positions, because it's integrated with the Gulp pipeline. You can see a good example for the RTL support in the media.css file of the OrchardCore.Media module. Attached media field Let's see how to use the new attached media field in Orchard Core! If you set up your site using the Blog recipe, you can add a new field to the existing Article content type. Go to the content definition of the Article content type and add a new Media Field to it. Let's call it Images. Now if you edit the Images Media Field, there should be an option to say I would like to use the attached type of the editor. In the following GIF, you can see how to change the editor type of the media field and add images with the different editor types. The main difference is now instead of browsing an image from the Assets, you can upload your new image from your computer. So in the case of an attached media field, you can't pick a file using the media picker. These pictures are not available in the media manager, they are only stored for this content item and only accessible from this content item. They are stored in the same folder as all the media, but they are not manageable. The content item is the aggregate root of these images. If you navigate to Content -> Assets we don't see the files, just if you have the right permissions for that. On Lombiq Orchard Dojo Newsletter Now we have 59 subscribers of the Lombiq's Orchard Dojo Newsletter! We have started this newsletter to inform the community around Orchard with the latest news about the platform. By subscribing to this newsletter, you will get an e-mail every time when a new post published to Orchard Dojo, including This week in Orchard of course. Do you know of other Orchard enthusiasts who you think would like to read our weekly articles? Tell them to subscribe here! If you are interested in more news around Orchard and the details of the topics above, don't forget to check out the recording of this week's Orchard meeting!

Getting up to speed with Orchard - Dojo Course

UPDATE (2017-11-22): Dojo Course 2 is released with new, updated videos! How to run Orchard as a developer? What are other, more advanced built-in modules I should know about? Our second Dojo Course tutorial aims to give anwers to these questions. The notes for this tutorial: Download Orchard Source 1.7.1 to run Orchard from source What is Orchard.sln When you starting working, create a copy of Orchard.sln, e.g. DojoCourse.sln A quick glance at the folder/solution structure: built-in modules, the default project (Orchard.Web) is the heart of Orchard NB: VS2012 uses IIS Express instead of Cassini web server Built-in vs. core modules CommonPart settings Tour of the Navigation feature, integrated since Orchard 1.5: menu item types, reordering menuitems, extensibility Demo: creating pages and corresponding menu items Renewed media management enhanced with content types: Media Library (since 1.7) Importing media with drag&drop Editing imported media items, creating folder structured and drag&dropping items between folders Resizing pictures inside of Media Library Guide to the built-int modules Continuously updated source code for the Course (you can upload the latest source in a zip from here) Remember: if you have any questions don't hesitate to ask them by creating a new issue in the Orchard issue tracker with the "discussion" label. Make sure to prefix your thread's title with "Dojo Course - "! We keep an eye on these issues. Haven't you enrolled yet? Why not do it some time in the near future like right now?