RefineryCMS How to add new menu in a admin pannel - ruby-on-rails

Can anyone guide me How to add new menu in a admin pannel of refinerycms in ruby on rails application.
I just add one more tab. Is there anyway.?
Admin pannel

It's call an Extension you can create generate a custom Extension and it will appears as a menu in the admin panel.
Also, when generating an Extension, make sure you pass the necessary switch, e.g. --i18n, to avoid manual updating them later.

Related

Login and registration page path in ASP.NET MVC

I am a newbie in C# programming and web development. Kindly let me know how I can find the code files for the login and register page in ASP.NET MVC.
I created this simple web app using this crash course; https://www.youtube.com/watch?v=BfEjDD8mWYg&t=909s.
This is the screenshot of the page I want to locate and alter. I want to change the text next to the login and registration forms.
Looking forward to getting a reply from anyone who can help.
Thanks in advance
I tried looking in all the files, like the css file and all the files in the views folder, but I could not find the file I want to change the text on the registration and login page.
I check the video you provided and find that he created a project with Individual User Accounts, So the project will generate Register and Login page Automatically, But you can't find these pages in your project.
If you wanna find these pages, You need to Scaffold Identity:
From Solution Explorer, right-click on the project > Add > New
Scaffolded Item
.
From the left pane of the Add New Scaffolded Item dialog, select
Identity. Select Identity in the center pane. Select the Add
button.
Select pages you want to create, Here you can choose Login and Register page, Then To use your existing data context, select at least one file to override. You must select at least one file to add your data context.
After you finish these steps and generate page successfully, You will find these pages in Area/Identity/Pages/Account/... ,Then you can edit them.
More information you can refer to this Docs.

Override AccountController in Individual User Accounts

I've created in Asp .Net Core 2.1 - mvc Individual User Accounts and add scaffold identity.
I need override route Identity/Account/Register to Account/Register. I guess I need access in AccountController and add attr [Route("")].
How can i do it?. In advance thanks for help.
In the latest Identity, there is no longer an AccountController. The ASP.NET Core team have made the (controversial) decision to move everything to Razor Pages. The old Identity scaffold of authentication and account management controllers and views now exists as the "default UI", which is included by default when you use AddDefaultIdentity. That method internally calls AddDefaultUI.
To modify the default UI, you must scaffold the pieces you desire into your project, which can be accomplished via right-clicking on your project in the solution explorer and choosing Add > New Scaffolded Item... That will then give you a window where you can choose among various available scaffolds, one of which is Identity. Selecting that option will pop another window allowing you to choose which Razor Pages you would like to scaffold. You can choose any or all. Since the default UI remains included, the scaffolded pages function as overrides, so anything not included falls back to the default UI version.
If you abhor Razor Pages as I and many others do and want the old-style MVC controllers and views back, you now have no choice but to create them yourself. You can scaffold all the Identity pages into your project as a guide and then shuffle the code into your controller(s) and views. Then, simply delete the scaffolded pages when you're done. You'll also need to use AddIdentity in ConfigureServices instead of AddDefaultIdentity, or the default UI will still take precedence. It's frankly a pain in the butt, but that's how it is.

Create an Admin Project Within a Project

I am still a noob to xcode so excuse me in advance. I am currently building an application that will require an admin app that updates the content to the application. I would like to incorporate this admin project within my existing project. Is it possible to add a new project to an existing project? If so, how would I go about doing this?
Thanks in advance
Just have a button that leads to the admin panel and then make a ViewController or series of ViewControllers for the admin settings. Only reveal the admin button when the user has admin privileges.

Make custom changes in admin generator

I develop a symfony 1.4 project,my issue with admin panel in backend,so I use the administration generator to do it.
I have a list of members generated automatically in backend,now Im hopping to add some custom action when a memeber edit her profile in backend,then I wish to add in edit page radio dial buttons give simple “Yes” or “No” Options. By default, the radial dial button is set to “No.” However, if the admin selects “Yes” then a popup window will come with the following text: “Are you sure you want to sell a new membership" and If the admin selects “Yes” and then saves the profile, a pop Window will need to display that reads: “New Membership sold"...
the problem is I can't change code because the form of edition page is generated using a plugin (sfguarduser) so It's deficult to make any changes?
Any Idea?
As the plugin documentation says, you can override the plugin module by creating a module with the same name in the application you want and by adding a require_once in the action.
As for your confirm and other javascript, you can override the generated partials by adding partials with the same name in your module, just as described here.

Insert non-Refinery link into Refinery navigation menu

Refinery generates its navigation menu in the _menu and _menu_branch helpers. I want to keep the provided logic since it allows a user to create a new page. However, let's say I have a model Product and I want to insert a link to the show action of Product in the navigation menu. What's the proper Refinery way to do that?
I found the easiest way to do it is create the page in the pages dashboard, and in advanced setting you just fill the redirect to /products/awesome or whatever the product slug or id is.
You can see how I did it on: http://tigrepictures.com/

Resources