Sitefinity Custom Backend Pages MVC - sitefinity

I know how to create a backend page through the UI (../Sitefinity/Administration/BackendPages/Pages). Is there a way to add one through the project in VS so that I can create a custom MVC Admin Page with control over the controller and styled similar to the rest of the backend?
I would like to add a new section at the top in the backend similar to Dashboard, Pages, Content, Design or Administration which links to one custom MVC page.

Best is to create the page through the Sitefinity UI and then just add your MVC widget to the page. Page will look exactly as the other backend pages and you will have control over your widget.
Normally you would create a Group page at top level, e.g. Custom Stuff and then a standard page underneath.

Found a good solution to this in combination with Veselin's answer above. Once a page is created through the Sitefinity backend at ../Sitefinity/Administration/BackendPages/Pages you can add custom MVC widgets. In order to restrict widgets to only appear for the admin pages you can register them to the section 'Dashboard' that is only available for backend pages:
[ControllerToolboxItem(Name = "CustomAdminWidget", Title = "Custom Admin Widget", SectionName = "Dashboard", CssClass = "sfMvcIcn")]

Related

How to show the .Net Core Identity RazorPage somewhere other than its default location?

.Net Core 6, MVC, and your basic authentication with Identity set up (which is RazorPages only), but I want my Home/Index.cshtml page to "host" the Identity/Account/Login page, preferably without having to resort to an iFrame.
Everything I've seen so far is simply how to build the Login page, but nothing on how to put the page somewhere besides its default location.
How do I put the Login form/page on my MVC Home/Index.cshtml page?
How do I put the Login form/page on my MVC Home/Index.cshtml page
Login page is a razor page not a partial view, so you cannot use <partial> to add Login page in the Index view. You can put your code for login in the Index.cshtml, but you may need change a lot, like building the Login page.
If you add below code in the _layout, so that you can login at any view you want.
<partial name="_LoginPartial" />
result:

Add a custom page to Spartacus

Probably my question is a bit dumb as there is a lot of documentation about routing. The problem is, I am not an angular specialist, so I am missing a bit of context.
I would like to add a custom sub page (http://localhost:4200/image-upload) to spartacus. The Header and Footer should be the same. Just the content should be an upload form.
Where and how do I configure the route?
Add a new content page in CMS with page label /image-upload (with the leading slash). Spartacus routing should handle it OOTB. https://sap.github.io/cloud-commerce-spartacus-storefront-docs/adding-and-customizing-routes/
Add a layout config only if your page has custom layout https://sap.github.io/cloud-commerce-spartacus-storefront-docs/page-layout/#configuring-the-layout
Implement Angular CMS components that should appear on this page and configure mapping from CMS component type to the implementation https://sap.github.io/cloud-commerce-spartacus-storefront-docs/customizing-cms-components/#page-title

link to another controller with hot towel and durandal

I am developing an mvc4 app with multiple spa's.
I am using the hot towel template for my spa.
What I want to do is have a anchor link within my views for a spa go to the index action for another controller, so my users can exit one spa and open another. Not all actions will start a spa some are regular mvc style pages.
I have put code like like the following in my spa html pages:
Navigate to another controller
This will change the url in the browser but always reloads the default html page for the spa. If I hit the refresh button in the browser then if will go to the proper page.
I have been able to put a target on the anchor tag of _parent or _top like:
Navigate to another controller
and it will navigate to the new controller page.
I believe it is something in the durandal framework that is preventing the spa from navigating to the second controller, but since I am just starting to work with this, I am stumped as what I need to change. I think there should be a better way than using the target in the anchor tag, or is that the best option.
I hope that I have understood you correctly. I believe this behaviour is caused my Sammy.js (which the durandal router is currently based on). The default behaviour of Sammy is to hijack all links and process them as regards to the SPA itself.
I didn't like this behaviour for the website I am working on and needed links to other MVC web pages to be possible from within the SPA. What I really wanted is for regular links to just work and hash links to be interpreted as a link to another view within the SPA. So '/controller/action' would go to another web page and '#moduleId' would go to another durandal V/VM.
I found this Sammy option that works for me and set it in my main.js
// This stops Sammy from hijacking regular links
Sammy.Application.prototype.disable_push_state = true;

Can I create Page Tab through Graph API?

I am currently developing an web application on Rails. I want the user to be able to create his own facebook page. I thought of creating custom Tab for him on my main application or page.
Can Graph API create Page Tabs programatically?
I do not believe that it is possible to actually create a new application via the API. This would open a flood gate for possible spam.
What you will be able to do is allow users to add your tab application to their page and then provide them with some customization. You can add a tab to a page programmatically with a post call similar to this -
https://graph.facebook.com/PAGE_ID/tabs
along with these parameters -
app_id - Tab application to be added.
access_token - An access token with permissions to manage the page (manage_pages).
References -
Pages Documentation
Permisssions Documentation

How To create Custom Action

I want to create one custom action such that on that custom action page one button is available,on that button event i want to show hello word on same custom page
Custom Actions generally are used to link to Application Pages which will do the work.
You can include customactions to the Ribbon, to context menus (ECB), or to the Site Settings pages (as well as Central Administration).
The custom action will typically be a custom section with a link to an application page, and within that page you will perform whatever logic you require. You can pass tokens through to the querystring by enclosing them in parenthesis { } such as <UrlAction Url="/_layouts/MyApplicationPage.aspx?ListItem={ItemId}" />
Here's a link to a tutorial on how to create a custom action to appear in the Site Settings page. Google around for simliar tutorials on how to get a custom action to appear in other areas, such as the Ribbon or the ECB.