ADDING SITE VIEWS TO A COMPONENT
Using Sermon Distributor As Example
00:00:00 (Click on these time links to see Youtube video)
Let's look at adding Admin Views and Site Views to Component Builder's component. We will look at the different switches and the features installed for you. First, login. Open Component Builder under Component Builder, then go to components.
Settings - Views
Open Sermon Distributor and go to settings. There is a place for Admin Views. (Adding the Admin Views has already been illustrated.) There's Custom admin views and Site views. Click on 'add custom admin view'. There aren't any added to the component; Sermon Distributor does not have Custom Admin Views. 00:01:01
Adding Site Views Important Glitch
It has quite a few Site views. You might open it and see some of the buttons are not selected. Although you selected and saved it previously it doesn't show. This is a glitch in Joomla's own JavaScript. 00:01:25 Re-open. (For now, Admin view has the same issue.) Close and open it again, and it will all be selected. Keep a lookout for this; if you make changes and save it with those buttons unchecked, it will not include those values since it will be stored as null and you might get unexpected results. 00:01:56 Unfortunately this is not something that can be changed at this stage.
Site View Options(Menu-Metadata-Default View-Access)
Go to site view. Close it and open it again. Everything is selected. It has four options. Select the site views and add as many as you like.
- Menu
Add menu means that this site view will be added to the add menu aspect of Joomla. 00:02:46 Go to create a menu and to add a menu item. There is a 'select Type'; if you click on it there are list articles, etc. If you say 'yes' an XML file will be created which allows Joomla to notice that your component needs to be in the list. 00:03:12
- Metadata
Add metadata means that this page will make use of the metadata being passed to it. Usually, this means that in your model where you've set up your data, metadata is in the 'items' array or in the 'this' array by the global setting or via the actual item. 00:03:47 If you set 'yes' here, and did not set up the data in the model correctly, it won't work. Click 'yes' here. (See video.) Try your best to set up the data in the model, then compile and look in the view .html.php file to see how it collects the metadata. It will still add the script needed to load the metadata into the document. If it doesn't collect it correctly, you'd see it too. 00:04:22
- Default View
You can only have one default view. (Don't click more than one.). The default view is effective so that when you make a change and the system doesn't know where you want to go it takes you back to the default view. 00:04:53 Default view can either be your site default view being 'home page' or, if you are in this component, on 'preachers', for example.
- Access
Let's say some of these views you have set don't have public user or access, for example, to 'Sermon'. If you try to access the page, the system throws you back to the default view and gives a message that you don't have access. That's what the default view is primarily used for at the moment. It can become more useful as we continue to improve Component Builder. 00:05:37
Add access makes sure that a user has certain access rights. In an item, you can set the access rights and the view rights. It has multiple implementations. One is access groups, the other is groups. If you want access to this specific view to be monitored, tick that and Component Builder will ensure the access table is there. 00:06:10
After creating the Site view this is how you can add it. Check it and see how it works. 00:06:32
- 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