Welcome, Guest
Username: Password: Remember me

TOPIC: [FAQ] What is the correct public view for the front-end?

[FAQ] What is the correct public view for the front-end? 14 Dec 2011 01:53 #700

  • Maujb
  • Maujb's Avatar
  • Offline
  • Junior Member
  • Posts: 27
  • Thank you received: 2
  • Karma: 2
Hi Guys,
Firstly, I am stunned with the power of this application, which allow people like me (Designer) do create what I need.

I am creating a front-end view and I don't know which option should I use for this, collection or item.
I would like to show all the items title from a table in a list with a filter. I was able to do that with the collection, however it displays also the delete option.

I tried to create a collection view and use the 'Fly' instead of the 'Grid' but it is not possible.

So my question is, which view do I use to show all the items from a table? Collection or Item?
If I am correct in using Collection, how do I prevent the public user to have access to the delete option? How do I set the default access configuration to avoid 'public' user to edit, delete... an item?

Thanks a lot.
Mauricio
Last Edit: 14 Dec 2011 08:12 by admin.
The administrator has disabled public write access.

[FAQ] What is the correct public view for the front-end? 14 Dec 2011 08:04 #708

  • admin
  • admin's Avatar
  • Offline
  • Administrator
  • Chef
  • Posts: 3711
  • Thank you received: 987
  • Karma: 140
Of course you have to instance a collection layout. The delete button is useful for multiple delete, and only works if you check at least one item.

For sure, you'll need also an item layout (with a form) if you want to insert/modify data.
Coding is now a piece of cake
The administrator has disabled public write access.

Re: What is the correct public view for the front-end? 14 Dec 2011 08:09 #709

  • giori
  • giori's Avatar
  • Offline
  • Senior Member
  • Posts: 73
  • Thank you received: 14
  • Karma: 6
You control access to the delete button with standard Joomla ACL's. It works perfectly. Public user = no delete access, special user group = delete access.

I did it and it works.

Also, the video lessons explain very well how to use the collection/item pair.
The administrator has disabled public write access.
The following user(s) said Thank You: admin

Re: [FAQ] What is the correct public view for the front-end? 14 Dec 2011 12:58 #711

  • Maujb
  • Maujb's Avatar
  • Offline
  • Junior Member
  • Posts: 27
  • Thank you received: 2
  • Karma: 2
Hi Guys,
Thanks for the quick response.

Yes, I noticed I can change in Joomla back-end, under options, the access to the delete button.

By default the delete button is enable to public, my question is, is there a way to set the default front-end view to not allow acces to the delete button?

I did do it from the back-end of joomla after installing the component I have created using Cook and it works. I just would like to know it is is possible to set the public = delete access denied using cook. So when I install it, it is already set to not show the delete.

Thanks again.
Mauricio
The administrator has disabled public write access.

Re: [FAQ] What is the correct public view for the front-end? 14 Dec 2011 15:32 #712

  • giori
  • giori's Avatar
  • Offline
  • Senior Member
  • Posts: 73
  • Thank you received: 14
  • Karma: 6
If you do not need the delete button on the public frontend you simply drag the delete button to recycle bin. Then it's gone. You will still have it in the backend
The administrator has disabled public write access.
The following user(s) said Thank You: admin

Re: [FAQ] What is the correct public view for the front-end? 14 Dec 2011 18:13 #713

  • admin
  • admin's Avatar
  • Offline
  • Administrator
  • Chef
  • Posts: 3711
  • Thank you received: 987
  • Karma: 140
Thanks giori,

For information, on Joomla, ACL and view levels cannot have different behaviors between FRONT and BACK.

I mean, for the same user account, you cannot allow to delete in back and not in front. It is not possible, and it does make sense at all.

But, tell me Mauricio, can a public user delete items in your component ? It is not possible by default. You should make a mistake.

In the sandbox, you can check all this, changing the virtual user. It is the combo box displaying users.
'Me' = Super Administrator.
For other users, check the tooltip button in its right to know what are the current virtual ACLs. Choose 'Guest', and tell us if your 'delete' button still visible. If it is, means that you changed your ACL default configuration of your component.
Coding is now a piece of cake
The administrator has disabled public write access.

Re: [FAQ] What is the correct public view for the front-end? 15 Dec 2011 00:33 #714

  • Maujb
  • Maujb's Avatar
  • Offline
  • Junior Member
  • Posts: 27
  • Thank you received: 2
  • Karma: 2
Hi Admin,

You are right, the delete button doesn't appear if I am logged as guest.
So it already works correctly, I just didn't noticed it because I was logged as supper administrator.

Thanks for clarifying that and for the tip to switch users in the top right combo-box.

Thanks a lot.
Mauricio
The administrator has disabled public write access.
Time to create page: 0.184 seconds

Get Started