You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Magento2中vendor/magento下theme-frontend-luma及blank/luma主题位置查询

Magento2中Blank/Luma父主题的实际位置查找方法
  • 如果你是用Composer安装的Magento,Blank和Luma主题确实在vendor/magento目录下,但目录名是:
    • Blank主题:vendor/magento/theme-frontend-blank
    • Luma主题:vendor/magento/theme-frontend-luma
  • 要是找不到,排查这几个点:
    1. 先确认Composer是否拉全了核心包,执行composer install或者composer update magento/theme-frontend-blank magento/theme-frontend-luma,确保这两个主题包被正确安装
    2. 如果你是手动下载的Magento安装包(非Composer方式),这两个主题在app/design/frontend/Magento目录下,对应blank和luma文件夹
    3. 检查项目的composer.json,看看require或replace字段有没有排除这两个主题的依赖,要是有就移除相关配置后重新执行Composer命令

扩展父主题小提示

创建自定义主题时,在主题根目录的theme.xml里指定父主题即可,比如扩展Luma的配置示例:

<theme xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Config/etc/theme.xsd">
    <title>我的自定义主题</title>
    <parent>Magento/luma</parent>
    <media>
        <preview_image>media/preview.jpg</preview_image>
    </media>
</theme>

内容的提问来源于stack exchange,提问作者afiya zannuba

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.07.10 08:33:15