How to modify an existing Aheto Layout
In theme, that is created with Aheto plugin, Aheto folder has a directory with widgets which have files for layouts.
- For editing options in layout you need to find controller file of this layout.
In controller you have add_action with function of options, where:
- Name of widget’s directory
- Function name
In function of options you have:
- Path to preview images of layouts in widget
- Slug of layout (the same as controller file name)
- Name of layout
- Preview image name of layout
All your options in function has dependency, where:
- Slug of option, what need condition
- Slug of option that will be control condition
- Value of control option (can be string or array)
Note. Slug of layouts option is “template” .
Options in function for layout are in add_params and has :
- Slug of option
- Type of option. Note. It can be “url”, “text”, “textarea”, “attach_image”, “group”, “select”, “css_editor”, “switch", “typography”, “colorpicker”, “slider”, “link”, “responsive_spacing” and “wysiwyg”
- Heading of option
- Description of option
- Default value of option
Also you can have image sizer (for custom image size) in your layout, where:
- Name of group (tab) in Elementor admin panel
- Prefix for option (same role as the slug)
- Conditions for image sizer option
Also you can add button params to your layout, where:
- Prefix for option (hase role as the slug)
- Name of group (tab) in Elementor admin panel
- Enable/disable options for icons in buttons
- Conditions for button params option
- For editing html structure in layout you need to find view file of this layout (with the same name as controller file):
In view file of layout we have:
- Extract option
- Get custom css for the layout ( if you added custom css in Elementor admin panel for layout )
- Custom attributes for layout’s wrapper
- Path to widget directory
- Check for css files for option “Custom CSS including” (Aheto Dashboard->Optimization->Custom Css Including, if the option is enabled, all css files from layouts on page moved in one css file)
- Include css (or js) file for layout
- HTML structure for layout
- For editing styles or scripts in layout you need to find .scss/.js file of this layout.
Note. All our styles and scripts are generated by Gulp.
- For editing preview image in layout you need to find image file of this layout.
That’s all you need for editing layout in theme for Aheto.