Parent Themes in Venddor IO

Basics of Theme Dependency

When theme X specifies theme Y in the parent_theme field of the manifest.json file, theme X becomes a dependent (or child) theme, while theme Y is the parent.

A dependent theme usually houses files differing from the parent theme. If a file isn't present in the child theme, the system fetches it from the parent. The css, media, and templates folders from both themes are harmonized in real-time.

Hierarchy & Priority

However, when it comes to layouts and styles folders, they don't amalgamate:

Image Directory Access

Images from the parent theme can be accessed using the $images_dir variable. The directory it points to depends on whether the theme has a parent or not. Use $self_images_dir to directly access a theme's unique media/images directory.

Theme Cloning

When cloning a theme:

Theme Installation Nuances

Only the dependent theme's files will transition from var/themes_repository to design/themes during installation. The parent's files aren't merged during this process.

Theme Upgrades

Venddor IO's Upgrade Center won't touch custom theme files. Only core themes, like Responsive and Basic, undergo changes during upgrades.

Add-on File Integration

Themes derived from another won't automatically inherit add-on files. If an add-on is specifically created for a particular theme, only that theme will receive the associated template files.

Leveraging TPL Hooks from Responsive Theme

Even if the Responsive theme isn't the direct parent, any theme can utilize the handlers of its template hooks. For add-ons catering only to the Responsive theme, they can still be partially compatible with other themes using this fallback mechanism.

Given a theme structure, if the active theme is 'child' (which is based on 'parent'), Venddor IO will sequence its search for a TPL hook handler as: child → parent → responsive, opting for the first detected handler.

If the Responsive theme isn't installed, there's no search for TPL hook handlers in the Responsive theme.

In essence, this systematic hierarchical structure ensures smooth theme and add-on integration, providing versatility and customization capabilities to store owners on Venddor IO.