-
-
Notifications
You must be signed in to change notification settings - Fork 177
020 Adding Custom Admin Views to a Component
Hi Now we'll look at adding custom attribute to a component You make use of cost-benefit projection As our component And then Go to settings And then we'll go to custom admin views And we'll see Close that The game I will see you there has to custom admin views at it Now It is more switches than the site view because of its implementation being more than I make You can choose an icon Because in the backend You possibly I want to have an icon when your on that page The right Page Then you can decide with this should show in the main menu Negative you should show in the main menu the main menu Is a menu that drops down out of Zuma last menu item list Right And then the dashboard Which is that Dashboard we go to every time when we start with a component that All the icons are shown up Then the submenu is the one on the on the left Which you see when you are in a view So these are all placements where you can possibly have This Custom View Now if you remember The company Results we didn't add 2 Any of the Views individually we added 2 items so that's why all of these are set to know And That means we are at with targeting an item In a view Answer all we need to do a select the view which we are dieting Which is company And we say ok Does metadata yes or no And it has access yes or no And That's basically it To ensure that Targets the correct view is simply by selecting company here If I close this from Ormonde And then open that component So you what is happened with the settings Do you have a component open If I was to open Companies You see that has a button here 4 company result Now If you remember when we set up this custom admin View We we ensure that We are targeting an item ID And by selecting company we are saying we are talking to this company's item ID And that is what makes it work And then we said we want to see a chart I'm so if we look at these this little charts The icon itself We take on it We see the custom view shows up and that icon shows up next to it And all works well We also see that there is a combined results Button showing up here in the toolbar And that is because combined results Which selected we want carts To be the icon And we said List of records is set to yes And has metadata Hyundai success and also company And so D selections before Is only really necessary when you select main menu and submenu Because anyone to say before what Item you want this Menu to be created Now we selected dashboard list of Records And because of that Places that in here And you need to select the records that you want to look at And then you can complete on the combined results I'll grab those ID and Since we are modelling a data in the controller and the model It gives back to the view these results Through the custom implementation be done So Just a quick refresher If we go to component Builder And customer reviews Open company results We see that in the custom button We added the PHP You also added the button Explain two Two component builder what we what kind of buttons we want So we said we are struggling a single item is see those Edit company go to company logos does buttons R Actually related to Going inside of the And Then if you come out of this We saw that even and combined results We also added buttons But again those buttons the card companies go to companies Which corresponds to this controller And if we go to the view itself And we see that that's not responding to this button but actually To the buttons inside called companies and edit Those that's the buttons you were building in the custom View Where is the buttons we are looking at in here Is related to opening the custom view itself So That is too quick Refresher Same goes with the combined results Combined results is the button that you are setting up here Where is the other buttons are once you have combined them And you've take combined results You see that it adds two buttons dashboard and companies and those two buttons with setup in the view it Self So that you can know and sort of Understand what Area controls what set of buttons This area controls the buttons before open Bring the view where is interview the buttons your setting up there is 4 when you have opened the view Ok so that is setting up a custom admin View Do your component And some of the switches obviously again If anything is unclear or you not exactly sure You can all this Lee come on on and do anything So simply go change it to what you would think should work and compile a component and go look in the car And see what has been done and look and the Uno car Interface See what is being displayed And play around with it until you get that what you expected Just a quick heads up this Or ordering before is only compulsory when Actually selecting at main menu or at sub menu And if you're even use those It means That If If you got your component You have the icons area and here in the top you have your your Your Main menu items And once you've opened A When you're here on the right you have set menu So this is main menu this is dash list Robust list is that one which goes to the top Of the Of the components Toolbar Submenu is the one here on the So if if this Custom admin view is simply needs to be placed in the submenu in his lips on it's own it's not related to any Dataset Then you can use the submenu method if you only 18 Featured in the main menu these are all the features Where is the dashboard List record Feature Helps you to sort of Link to a specific set Of Data data structures like Like this one does So you can select these ideas and when when you click On this combined results the ideas of the selected items guess get passed 2 to the controller And if I go back to do that Show you that how we use it Combined results Custom button You basically see that Go to companies Is not in here So we see while using the main get called company's data get list query So let's go look at that data query I think that's we will find The use of the implementation of those ideas So we see we are basically reaching into the Input error Erase object here We getting CID Selected ideas And we saying It can be a CMD And Then we are exploding it and We are making sure that intervals And we placing it in our teas And so this actually gets the value From the post Object And Places that into ideas and here we do some validation To ensure that the person who's trying to access 2 Day Diet To do it And once we faster We basically use those ideas 2 2 to get The data so in in the filter We use ID is And check weather All the ID is Are in a ID and that in the code Basically if you look at the code So on the models combine results We see that it uses our checking method here Later You're down here It takes the ID is Spitz in array check service in array then implodes it And text where the roots You know only gets those ID That's how we we filtered the dataset With the results After selection And So That's just a little bit looking into the back end On how to make use of those Features and again as you can see it's some custom scripting we added to the dynamic get method To take those ideas and to use them In the way we intend Are you you can ignore them But here is the way that I implemented it If you wanna drop that down pause the video A copy of this area here Think would be the only part at Useful to your purpose And then you can use the ID is in your code As you please And know that this PHP as you saw In the code It runs before the get methods So it basically is a filtering option So then this query starts Then that code we wrote Is entered in here and then the rest of the code which Spell by component Builder Is being done and you can use a filter option with whatever you Collected up here Ok so that Looking into adding custom admin views to component Builder And just showing you again the tremendous Leverage and Design choices you can make In ensuring that your component is dynamic And Get sort of breaks out of the mould So that you can achieve Nice Complex components Write inside component Builder Thank you for watching
- Home
- Beta Testing
- Custom Code
- PHP Settings
- Demo Component
-
Tutorials
- Hello World JCB
- Intro JCB Guide
- JCB Installation Steps
- Planning Components
- Field Type Overview
- Basic Fields Creation
- Admin View Management
- Advanced Field Usage
- Admin Component Integration
- Component Setting Customization
- Scripting Components
- Component FTP Options
- Dynamic Get Method
- Site View DynamicGet
- Site View Templates
- Template Setup Guide
- Layout Configuration Steps
- Custom Admin Management
- Adding Site Views
- Custom Admin Integration
- MySQL Demo Tweaking
- Global JCB Settings
- Custom Time Field
- User Helper Integration
- Email Helper Usage
- Message Store Email
- List View Unescape
- Export Import Customization
- Overwrite Custom Fields
- List Field Filtering
- Automatic Code Import
- Manual Code Implementation
- Component Export Import
- Custom Admin Buttons
- Translation Management
- Site View Permissions
- Component SQL Updates
- Site Edit Configuration
- JCB Backup System
- Helper Structure Integration
- JCB v2.5 Upgrade
- Tab Setup Guide
- JCB v2.6 Release
- Extended HelloWorld
- Field Rule Validation
- Community Snippets Intro
- Snippet Forking Tutorial
- Pull Request Snippets
- Library Manager Area
- Excel-based Translation
- Dynamic Router Details
- Database Auto Updates
- Subform Quick Demo
- VDM Package Import
- Dynamic File Inclusion
- File Field Upload
- Drag-n-Drop Upload
- Quick HelloWorld JCB
- Non-database Fields
- Dashboard Customization
- Menu Prefix Toggle
- Community JCB Packages
- Collaborative JCB Workflow
- JCB Package Install
- JCB JAB18 Event
- Convenient New Fields
- Component Language Strings
- Library Functionality Anticipation
- Join Field Relations
- License Template Change
- Code Reusability
- Local Dev Environment
- Extended Field Types
- Joomla Custom Fields
- Custom Field Expansion
- Site View Listing
- Run Expansion Method
- Form Site View
- Field URL Update
- Additional Helper Methods
- Field Validation Rules
- New Placeholder Feature
- Component Config Params
- Per-field Default Values