Toolbar Functionality Within Theme

Permalink
Greetings C5 Community -

I'm dev'ing with 5.7.3.1 and would like to bake some of the functionality found within the C5 toolbar into some UI elements in my theme.

For example, my client feels that the "Delete Page" functionality is a bit obscure as one has to first click the "Settings" button on the toolbar to locate the "Delete Page" link. I'd like to add this functionality to a button on my page template to allow users who have delete permissions to delete a page. The rabbit holes I've gone down so far seem overly complex to implement a seemingly simple function like this.

In fact, it would be excellent if i could simply hide the C5 toolbar completely and implement all the various buttons from the toolbar into elements within my theme.

Thoughts?

axiandev
 
JohntheFish replied on at Permalink Reply
JohntheFish
You could build a block with a few buttons arranged as toolbar in it to do anything possible through the api. You can use permissions to decide who can see and use the block. Then place that block at the top of a global header area and you have what you are seeking.

If you want to manage permissions for individual functions on that toolbar, you will need to dig into the programming complexities of permissions.

The main difficulty in all of this would be that much of what you may want to do remains undocumented.
axiandev replied on at Permalink Reply
axiandev
Thanks John - that has been the ultimate challenge in this project ... the lack of documentation of the C5 product.

Oh how I wish ... but as the old saying goes: wish in one hand, crap in the other ... and see which fills up the fastest.

Thanks again for your response. I'm digging and will write-up a how-to once I figure out the bits.
Cahueya replied on at Permalink Reply
If anyone could point out how to restrict the view of a global area so that only the pageowner can see it, this would solve so many questions.

Even in 5.6 we could adress the page owner only through the sitemap but not in page defaults. I haven't dived into 5.7 permissions yet but if anyone could just extract that line of code ... beautiful :)