Composite C1 - Page template - Media folder placeholder - asp.net

Just downloaded Composite C1 one week ago, and started to learning functionality of this IMHO really good piece of software.
I have done a setup of Open Cph site, and started to building a web site.
Successfully integrated Composite with Visual Studio 2013, I am referencing issues to specify a media folder for Bootstrap carousel via page design mode.
This is what I did for getting this feature done :
Make a custom page template -> Called DestinationPage, where I have a
#Function("Composite.Media.BootstrapCarousel" , new { ImagesFolder = this.ImagesFolder})
Unfortunately, this whole morning I am trying to figure out how to pass this.ImageFolder value
from LayoutPage to DestinationPage with PlaceHolders. Is there any possibility when editing
a page to have a placeholder where you can pickup or choose a media folder?
I want to specify for each page a different media folder where BootstrapCarousel will
pick up images.
Anybody have solution for this?
I have several ideas on my mind, but as I said I am not experienced with Composite....
Thanks in advance.

Have you tried looking at creating a Page Metadatatype which will show up on a new Metadata tab when editing a page.
These are two good articles about Page metadata
Adding Metadata Fields
Filtering datatypes with metadata

Related

What's the best Wordpress page builder for creating custom HTML blocks and controls?

I'm searching a most simple solution to create my own page builder system. I want to code my own blocks and then add to them some controls, only that what I choose.
So on firs fire goes ACF with ACF Extended. Works great until I didn't create more flexible fields. For example, I'm creating ROW (first flexible content) with a specified numbers of columns. Then, in each column I'm adding a BLOCK (second flexible content). Some of the blocks can contains other flexibles or repeaters. In ACF the problem is a lot of flexible and repeater fields. If is to much of them, then WP admin crash, data is saving, but sometimes only a partial.
So I'm searching other, lighter solution for that. I've tried I think every page builder like Elementor, WP Backery, Beaver. Problem is they are based on build-in elements and a lot of controllers. It's fine if someone want's to create site quickly, without coding. But I need a some kind of developer environment when I have control on each function of my HTML blocks.
So, is anyone knows what tool I could use for that?
Thaks!
You did not name it in your list, so what about the Gutenberg Editor?
It's already in the core of wordpress, so the wordpress developers thought, this is the best block editor.
You can easily create your custom blocks and controls with ACF:
https://www.advancedcustomfields.com/resources/blocks/
This may also help:
https://www.advancedcustomfields.com/blog/acf-5-8-introducing-acf-blocks-for-gutenberg/
With Gutenberg, you can be sure, this is not an editor which will be gone in a few years. It will stay in wordpress core and it is only in the beginning of becoming the best WYSIWYG Editor in the core of a cms.

Can Sitecore templates be used to store SQL Queries or JavaScript

We are building a Page with dynamic functionality using ASP.NET + Sitecore 7.0.
Is it practical and appropriate use Sitecore templates for:
SQL Stored Procedure Name to be invoked
JavaScript to be invoked
ColumnNames to be used etc (related to coding customization)
Or should these configuration properties remain inside the ASP.NET Project itself?
What is the primary purpose of Data Templates in Sitecore?
Are they for developer customization or customer-level customization?
The purpose of a data template in Sitecore is to define the set of fields for content items which inherit from that template. - Think of a data template as a class and the content items (pages) as instances of that class.
Templates are usually used to define the user-editable content of pages within a site, that being said you can have items to store information which is not managed by regular content editors. The question is where do you draw the line between things which should be put into Sitecore and things which should be a part of the solution. My advice is only put things in Sitecore if they need to be there. If you have to have the ability for editors or admins to configure those settings/properties.
I would say that putting SQL/ColumnNames is probably a bad idea unless you are building some sort of report builder interface in which case it may be essential?
Likewise with placing JavaScript into Sitecore; this can be OK in moderation (e.g. snippets of analytics code which content editors may want control over?). If you're placing whole libraries of JavaScript into Sitecore, you're probably doing it wrong.
One final point to note is findability/re-factorability of code: if you have code spread between Sitecore and your solution, it can make it very difficult to maintain as it is difficult to get a complete overview of code involved.

WYSWYG web editor for Sharepoint

Is there any approach to have a simple WYSWYG free web editor (preferably drag'n'drop widgets -based) embedded or integrated into Sharepoint 2010?
I am shocked because this answer seems to not exist... So far I've found...
Plugins for integrating Sharepoint into Drupal, Joomla or Wordpress, but I want the opposite, using those interfaces to create content stored in Sharepoint, without having to export HTMLs and adapting them to SP arquitecture and metadata. If not, I cannot even find any way to export a Wordpress/Drupal site into Sharepoint.
Web content rich editor: Am I doing something wrong is this just an html loader that does not edit a thing?
Webparts: all seem to be costly, and I am not sure there even exists a nice one for that concrete task
Could somebody point me to the most optimal solution for non-tech users using this feature? Thank you
By the way, is there any public web part repository from microsoft. Even searching that in google does not throw any interesting info..
Most public, open source projects for Microsoft can be found at http://www.codeplex.com/.
Regarding your requirement, if I understand correctly, you want to have a way to store content in SharePoint for display in a drupal or other CMS. The content should be in HTML format. If I understand you correctly, the easiest way to do this is to create a basic SharePoint list, add a multiline column and set the type of text to Enhanced rich text (Rich text with pictures, tables, and hyperlinks). When you add an item to the list, the form will include a form element that has a WYSWYG editor.
I've integrated SharePoint with Linux before using Curl. It's not easy, but can be done.

ASP.NET - best method for website where user can create articles (like a blog)

I'm an ASP.NET newbie, but not so new at programming in general.
I'm creating a commercial website, and I want to allow an admin to add new articles (an article consists of text, images and various properties such as category).
I am trying to decide the optimal Modus Operandi. This site is commercial, so SEO is a major consideration. This means that I want each url to be "unique". That is, if someone navigates to an article about raccoons, he should be redirected to www.mysite.com/articles/raccoons. This means - I can't have one page that loads the appropriate article dynamically a-la AJAX (gotta use deep-linking)
So how exactly do I do this? suppose the admin entered his text, uploaded the images and set the article properties. I create a new subfolder, save the images to the server (I understand that saving images to a DB is a big no-no), their addresses in a DB, and the content itself to the DB. But now what?
How do I go about creating the actual page?
Is there a function for creating a new aspx file? then what about its corresponding cs file? Or is it unwise to use aspx? Maybe plain html? but then how does it work with my site's master page? Or maybe just create another copy of a general aspx file which is populated with an article according to a parameter?
I would like to know what is the "smartest" approach before I dive in too deep.
You can Consider ASP.Net MVC for this. What you need is more like a Content Management System rather than a Blog, as you mentioned an administrator will add articles.
By Using ASP.Net MVC, you have a very clean implementation there, your urls will stay as you need it for SEO, You dont have to create aspx pages on the fly but the framework will let you deal with new urls from your class files.

Importing into SiteFinity

I just finished installing SiteFinity 3.7 standard version on windows server 2008. Is there a way to entirely/partially import an already existing .NET project (ASP.NET) into SiteFinity with some minor changes in the code of course (may be by changinf a couple of xml files or something similar). I could only see an "export" under Administration->Tools section but no import. I am new to SiteFinity so a detailed help/guidance would be much appreciated.
Thanks.
I think you're on your own here. Sitefinity stores everything in a database so you'll have to programmatically convert the sitemap (read XML insert into database). Sitefinity does have an API that allows you to do this. You can for example create pages and add controls to that page.
Sitefinity uses MasterPages as templates so that's easy. You can also re-use any controls you have.
But, by the time you're done writing the conversion code, I think you'll find that you could have done it all by hand in less time. Unless this is a huge website you need to convert.
if you just need to import the pages you can add them as "external pages". this allows you to set permissions, page properties, and add it to you navigation/sitemap but of course doesn't let you edit the page inside of sitefinity. I did this with some sites that were developed seperately but needed to be in our sitemap.
You could also wrap the content and code into user controls, then add those to the page. We did this for an application that we built. the pages had to live inside of sitefinity, but the programming was already done, and needed to be in user controls. Once again you don't get to edit the content in sitefinity, but you get to keep your existing code.
Finally, if you used any kind of content management system, you can easily import stuff like news/events/etc via the various managers, it works something like:
var mgr = new ContentManager("News");
var content = new mgr.CreateItem("text/html");
content.SetMetaData("Title", importedItem.Title)
...
mgr.SaveContent(content);
this isn't EXACTLY the code but it's something similar; you can use the api documentation to learn more.
If it's plain text, then unfortunately yes, you'll have to manually copy this into sitefinity. It is a bit of work, I did this with our hundreds of pages, but in the end it's worth it to have the cms benefits.
hope this was helpful!

Resources