Adding only one special Block Type
Permalink
Hey community,
to improve the usability for customers I want to restrict that he can add on a special place only one special Block Type like "Google Maps" or anything else like a Navigation.
I want to restrict that the customer is not able to add any other Block Type like this type I allow in the code.
For example I have a div, and in this div only the Block Type "Auto-Nav" should be added here.
The best possibility to restrict could be:
<?php
$navigation = new BlockType('Auto-Nav');
$navigation->setBlockLimit(1);
$navigation->display($c);
?>
But this is not impossible.
Can anybody help me please?
to improve the usability for customers I want to restrict that he can add on a special place only one special Block Type like "Google Maps" or anything else like a Navigation.
I want to restrict that the customer is not able to add any other Block Type like this type I allow in the code.
For example I have a div, and in this div only the Block Type "Auto-Nav" should be added here.
The best possibility to restrict could be:
<?php
$navigation = new BlockType('Auto-Nav');
$navigation->setBlockLimit(1);
$navigation->display($c);
?>
But this is not impossible.
Can anybody help me please?
Hi nebuleu,
thank you so much for you answer.
I tried to follow your instructions,
but I wasn´t able to find the buttons.
I only see whats in the attached screenshot.
Can you please help me again, respectively
give me please more details?
Thank you so much.
thank you so much for you answer.
I tried to follow your instructions,
but I wasn´t able to find the buttons.
I only see whats in the attached screenshot.
Can you please help me again, respectively
give me please more details?
Thank you so much.
Hi, sorry I found it, now...
I was at the wrong permissions,
I have to click to the "Add to" Section
Thank you so much
I was at the wrong permissions,
I have to click to the "Add to" Section
Thank you so much
Yes, this permissions settings are linked with an Area, not the page.
-> Edit a page
-> clic on the area and select "Set Permissions"
-> "Override Permissions" button
-> "Add Block to Area" permission
-> "Details" tab
-> Customize the blocks by groups
So it should be possible to do it programmatically, but I don't have a ready to use example.