WP Bakery Page Builder (formerly Visual Composer) mandatory fields in custom elements - visual-composer

Is there any way to add a mandatory / required field in a custom VC element?
I cannot find any option like this here:
https://kb.wpbakery.com/docs/inner-api/vc_map/
I think it should be something like:
"required" => true in the param section...
But is there a way to do it? a hook/filter maybe?
Thanks

Related

crafter-cms: how to create the form using crafter

I am new to crafter, I have use the empty blueprint .and then I have created a page .but i want to design the form .How we can use the element of form like input, radio button, dropdown list, also how to provide the action of the form ,also how to style the page , and how to use the JavaScript. Please
Crafter CMS doesn't restrict your HTML/JS. You can use any framework/tool/markup you like.
You can edit entry.ftl in the templates folder and put whatever markup you want if you're in a hurry.
You should also read the modeling article in the docs to understand how to give power to your content authors: https://docs.craftercms.org/current/developers/content-modeling.html
If you'd like to learn how to best use Crafter CMS, consider taking a class here: https://crafteracademy.teachable.com

Sub categories shopware5

I am using a custom theme in Shopware, the parent theme is "Bare" theme, when I need to use some data or alter existing data, still I do not understand how I can do this using controllr, plugin or widgets.
Example:- I need to display "sub categories" on my home page main menu.
When I use "{debug}" on my index.tpl I can see all the main categories but the sub categories are not available even though I have created and activated sub categories on my back end.
I checked the configurations settings to make sure if anything is blocking it from showing on front end.
What kind of approach I should use to get this thing done.
What is the solution?
Update index controller?
Any CMS option to enable /disable?
install a plugin?
create a widget?
FYI: This is what I can see on my debug screen on home page (index.tpl)
$sCategory
flag => false
subcategories => Array (0)
childrenCount => 2
7 => Array (23)
id => 7
name => "IVORY & WHITE"
metaKeywords => null
There is a plugin called AdvancedMenu which has to be activated via the Plugin Manager. In the plugin's config you are able to define the nesting level of how deep the category should be shown. This setting set to 2 by default, I guess. After activating the plugin there should be a new variable $sAdvancedMenu available in the Smarty template.
Please have a look: http://en.community.shopware.com/_detail_1602.html?_ga=1.192119343.464766896.1445350898
Another way (without the AdvancedMenu plugin) would be as follows:
There is a Shopware Core class available via Shopware()->Modules()->Categories() that contains a method called sGetWholeCategoryTree($current). This method returns the whole category subtree for any given root category. But in that case you need to create a plugin that is listening to the Enlight_Controller_Front_PostDispatch event or any similar. After assigning the tree to the view you will have access to a hierarchical multidimensional array of categories with their related children.

Adding User Defined Runtime Attributes?

Is there a way to add user defined runtime attributes to a button in Xamarin's storyboard designer?
I'm trying to get Pixate Freestyle to work and need to define the attributes. I can only find the place to define them within xcode.
I was working on a Xamarin Forms project and I figured out that on each platform, there is a method to update the style for a Control. The way I used to do this is something like this:
PixateFreestyle.SetStyleId(view, styleId);
or
PixateFreestyle.SetClassId(view, classId);
Where view is any UIView you want to style ann styleId/classId is a string with the style name in your default.css
Hope this works for you
This is where I based my project
XamarinForms-PixateFreestyle

create menu from taxonomy/term in drupal 7

in the documentation site of drupal:
http://drupal.org/node/774892
It shows an example of how to create a menu using taxonomies. Basically we must add a link to an url like taxonomy/term/{termID}/all . But it says it can not work with drupal 7. is there any other way to make that menu from a hierarchical taxonomy?
Thank you
Yes there is a module Taxonomu menu. You can generate menu for any vocabylary.
Transform any of your taxonomy vocabularies into existing menus
easily!
P.S. I use 7.x-1.x-dev release instead of recommended. There are more options
You can use Taxonomy menu module for the same.

how to apply custom action in ECB only for document item

I have added a menu item in edit control block(ECB) in document library(using following msdn article http://msdn.microsoft.com/en-us/library/ms473643.aspx)
Now i found that the custom action(menu Item) in ECB is displayed for both document item and document folder. So how to apply custom action only for document item?
Are you using list as your RegistrationType?
Try using ContentType as your RegistrationTypeand specify the guid of the Document Content Type (I think its 0x0101) in your RegistrationID.
You will need to create a class which inherits from WebControl. This class will need to render out your menu item as you want it displayed.
You then need to use the ControlAssembly and ControlClass parameters from your CustomAction definition to specify this class.
Your class will need to detect the if the current item is a document or folder and render/not render itself accordingly.
I would get the control working first just displaying a link, then add the logic in later.
This is a good blog posting on the technique, its not for the ECB but the principals are the same.
Enjoy!
In your customAction use RegistrationType="FileType" to determine FILE and use a RegistrationId="doc" to determine a extension, my exemple use word document. ;-)

Resources