Add a custom page in Composite c1 version 2.1 - c1-cms

I am working on a website which requires a functionality to import an excel spreadsheet. The admin of this website requires us to have a custom designed page in composite for him to simply select a excel sheet and upload.
Is there a way to build a custom page in c# and merge or add into composite ?
P.S - they are using composite version 2.1.1

On http://docs.composite.net/Data/Adding-pages-with-Csharp there is a guide on adding pages to Composite C1 using C#.
But I suggest you handle this situation (dynamic content from an outside source, here an Excel sheet) using a C1 Function instead of generating a new page. Create the page like you normally would, but host a C1 Function on that page. Let this C1 Function generate what ever dynamic content is needed.
You can create C1 Functions using a wide variety of languages (ASP.NET UserControls, Razor, MVC, XSLT, raw C# that output html). Select the technology you are most comfortable with.
Relevant links:
http://users.composite.net/Functions/GuideToC1Functions/What-is-a-C1-Function
http://docs.composite.net/ASP-NET/Razor
http://docs.composite.net/ASP-NET/Web-Forms
http://docs.composite.net/ASP-NET/MVC
http://docs.composite.net/XSLT/First-XSLT-Function
http://docs.composite.net/ASP-NET/CSharpFunctions

Related

Create a from builder using Django

I am fairly new to programming and start my career with Python Django. I already build some basic application and recently came across to use google forms and decided to create application like this.
Where any user can come to certain page and can able to create his own form as per his requirement.
I though of some new features like drag and drop. I wanted to ask if that's somehow possible to drag drop input fields or something like that using Django template system where I can use some simple JS library or if its possible using React as fronted.
So my requirements are quite simple, but I am confused with Django models that what will be the structure of models.
UI should be drag n drop thing. User can select the list of fields available in the inventory. And create his own form.
And on post submission. From django you need to capture and store the data.
Here in this case the data will be the form fields as well as its values.
Ex form fields which are available in the inventory.
Test field
Email Field
Multi select field and
Drop Down Field=
I hope someone can help me so that I can get started and came up with some methodology.

Content Management Api to POST media files from external source

I am looking for a solution in episerver to add media files from external sources into episerver.I am aware that episerver has recently released Episerver Content Management API to post contents within Episerver.Is it possible to use this for media files as well.As this is newly introduced in episerver, i cant find any references other than the documentation within epi which has more of CRUD operations on Content.Can someone please point out some reference links for me to get this started?
Any input is appreciated.
Regards,
The content management API is useful if you want to create a headless website that talks to Episerver via an API to get content.
Depending on what you want to use the media for will depend on the optimal approach. I assume you want the content editors to be able to pick these items from within the CMS? If so there are two main appraoches:
You could write a scheduled task using the content repository API to import the media into the Episerver media library
The other option is to create a content provider, so the media is available in the editor, read this to learn how to do it. This option is more fidley so I would go with option 1 if possible.
If you just want to render images on a web page, then call the API using AJAX. Job done!

Use Categories/Tags from one 2sxc app across the site for all apps using the DNN Taxonomy terms list?

Looking to use the DNN Taxonomy either by using 2sxc's Folksonomy on its own or if there was a way to join the two tag tables and sync tags across site. For example the 2sxc Blog app has Categories and Tags, the 2sxc News app has Categories but no tags (out of the box), is it possible to use the same Categories list for both apps where the list is actually the tag terms set in the Vocabulary terms db table?
Is this use case something that can be achieved using the visual query designer?
I'm looking to use the 2sxc Blog, 2sxc News apps and create a similar Document management app where all apps use same Categories list (list set by us and will not change) and Tags which admins can add remove similar to Blog app which would be a hierarchical tree list in the Vocabulary terms table.
UPDATE:
Trying to achieve something similar to what WatchersNET has in their TagCloud module (https://github.com/w8tcha/WatchersNET.TagCloud) where you can select a DNN Vocabulary or use a custom tag which is a great feature to incorporate DNN's built in Vocabulary, see below
Yes, this can be done, and isn't implemented ATM.
I'm not sure if the DNN Taxonomy would be the ideal place to start - but if you're already using it it could easily work.
Yes, visual query would be a simple place to start - with a Dnn-Sql Data source.
Another alternative is to create a custom WebApi. ATM there is no dropdown-from-webapi yet, but if you need it, I'm sure we could add this in no time :).

Database search field database

I'm looking for a way to create a search box in wordpress, where visitors can search a number from the database. Is this possible? I have several package numbers in my database. I want to give my visitors the ability to search for their package number and request the information that comes with the number.
What you want to do can be done.
I suggest a different approach than using wp-exec. (I just looked at wp-exec website, and that plugin was created for WordPress 1.5, which means it hasn't been updated in about 5 years).
The content you want to display exists entirely outside of WordPress. I suggest you use a custom page template - see
http://codex.wordpress.org/Pages#Creating_Your_Own_Page_Templates
In this case you would not use WordPress posts or pages or custom post types. On the custom page template you would write (or have written if you don't have the knowhow to do it yourself) PHP code to extract the info from the database and display it on a page.
For pages like that you would be using WordPress only as a container within which to display the results - they custom page would appear in the site Nav, The page of results would use the site's theme to display so it looks like the rest of the site.
But the code to display from the database would not use the WordPress loop. It would be PHP / MySQL data retrieval and display code.
I really doubt you will find a plugin that lets you display results from an external database, formatted the way you want them to appear. The reason is every external database is different, has different tables and table structures. And no two sites will want the external data visually displayed in the same way. So there is little generalization to encapsulate in a plugin as everyone wants it different.
I've created pages on some sites along the lines of what you want to do thus I know it can be done. But it requires writing custom code.

Convert Composite C1 - insert MVC partial requires Visual Studio solution?

It appears that you either start a Composite C1 site by using the Visual Studio solution - or just install the exe, which contains no solution file and can just be used through the web CMS.
I need to include an MVC 4 Partial in a page on a site that was only installed with the .exe & edited only through the web CMS. Can I add a partial in the CMS (not in VS), or do I have to use VS & manually compile the site before deployment?
I have tried adding the sample MVC files from the below to my C1 site & navigating to /Home:
http://docs.composite.net/Functions/MVC/HelloWorldMVC
The URL for Composite is localhost/mysite
I try going to localhost/mysite/home - but it doesn't work.
Thanks.
do I have to use VS & manually compile the site before deployment?
Normally, you don't need Visual Studio in order to use the MVC Player - unless you have to use VS (or any other tool) to create and add views and controllers to the website. In any case, everything should work on-the-fly without having to compile the website

Resources