concrete5 notebook

Adding Advanced Users Permisions to a concrete5 site

Concrete5′s default permissions only allow basic website access but advanced permissions allow any combination of users and groups to be assigned to the following:

  • Page-specific Access
  • Adding, editing, reading versions and deleting pages
  • Being able to add only specific page types to specific sections of sites
  • Area-specific control
  • Block-specific control

To enable advanced permissions, add the following line to end of your “config/site.php”:

define('PERMISSIONS_MODEL', 'advanced');

Once enabled, go to Sitemap/Set Permissions. You’ll see a new dialog box with more user options. More info on this page:

http://www.concrete5.org/documentation/general-topics/simple-permissions

Hard coding a stack into concrete5

To hard code a stack into one of your page templates, or the header.php for example create the stack (in this case, we’re calling it Header Image), and then use this code snippet to insert into your file.

$stack = Stack::getByName('Header Image');
$stack->display();

 

$a = new Area(‘HeaderImage’);
$a->display($c);
?>

replaced with

$stack = Stack::getByName(‘Test Stack’);
$stack->display($c);
?>

Great article about the stacks here: http://andrewembler.com/posts/stacks-vs.-scrapbooks/

 

Unable to load sitemap data in concrete 5.4.1.1

Best solution without upgrading to the next version from andrew in the c5 forums.  Change method_exists to is_callable in the iterm_list.php. You can view the code here, on github.

Scroll down to the code block for web/concrete/libraries/item_list.php to see where line 106 has been replaced.

if (method_exists($this->attributeClass, 'getList')) {

changes to:

if (is_callable(array($this->attributeClass, 'getList'))) {

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>