Skip to content

019 Adding Site Views to a Component

Amigo edited this page May 14, 2019 · 10 revisions

Hi Now let's look at adding admin views and site views to component Builders component And looking at all the different switches and the nice features that we have there installed for you So we first login here Then we have component builder open on the component builder And then we will go to 00:00:25 Let's see components And we will open Sermon Distributor And then go to settings And in settings you see there is a place for admin views we're ready illustrated adding the admin views Then there's custom admin views and their site views And we wanna look at those now so I'll just click on add custom admin View There isn't any added to this component because component builder Sorry 00:01:01 sermon distributor does not have a Custom admin views But I'll illustrate it in another component for you Then site views It has quite a few You might sometimes open it and see That some of the buttons are not selected Although you know you selected it previously and saved You know now doesn't show This is a glitch and 00:01:25 In the Joomla's own JavaScript or whatever That is causing this and so the only way I have found to solve it as yet is to simply re-open Like for now you see the admin view that's same issue So if you close it and open it again It has it all selected This is a heads up keep a look out for this because if you make changes and save it with those buttons unticked Your build will 00:01:56 Not include those values Since it will be stored as null And Yeah you might get unexpected results So always make sure that your old ticks are All in place that just a heads up Not really something I can change at this stage it is a Joomla thing of the repeatable fields Ok so if we go to site view 00:02:21 And we just Close it again and Open it again You see everything is selected You see that it has 123 4 options here Obviously here you select the site views Just add as many as you like Then add menu means that this site view will be added to the add menu Aspect of Joomla 00:02:46 You know If you go to create menu And then you go to add menu Item Then there is a select Type and when you click on select type then there is this list Articles and whatever Now if you say yes there you'll create a XML file Which allows Joomla to notice that your component needs to be in the list And the XML file we will look at in the moment 00:03:12 But that's just you know that's what this Switch here add menu does Add metadata means that this page Is gonna actually make use of the Net the metadata That is being passed to it Usually that means that in your model you've set up your data So that there is a Metadata in the items array or in the In the item array or in the this array 00:03:47 Either By by The global setting or By the the actual item So this is meta implementation You even if you set yes here And you did not Set up the data in the in the model Correctly it won't work and the way for you to look at that is obviously click yes here try your best setting up the data the model then compile and go look in the view .HTML.PHP file to see how it grabs the meta data because it will still add 00:04:22 The Script that is needed to load the metadata into the the document But if it doesn't Grab it correctly Then you'd see that as well Ok then Whether you can only have one default View So don't click more than one to yes but what the default view effectively is is that sometimes when You make a change and the system doesn't know where you wanna go 00:04:53 It actually throws you back to the default View Know that default view could either be your sights default view being home page Or it can be if your in this component it could be for example on this one it's preachers So Let's say some of these views you set that they don't user a Public user don't have access for example to sermon then if they try to access that page The system will throw them back to the default view and give him a message saying you don't have access And so that's what the default View Primarily used for at the moment But I can see it being coming even more useful as we continue to improve in component Builder 00:05:37 Then add access It's basically making sure that a Sydney user has the specific access rights You see in a in an item you can set the access rights As well as the view rights So it's multiple implementations Different implementations one's access groups the other one is just groups And so you can tweak whether you want access on this specific View to be monitored And If you tick that Then 00:06:10 Component building will ensure that the access Table is there Ok So that is adding a site view to to your component Obviously after having created the site view Then this is how you can add it to check it See how it works Ok now next up we gonna look at 00:06:32 Custom admin views being added Thank you for watching

Clone this wiki locally