كيفية تجاوز ملف الشريط الجانبي لقائمة الرغبات في الوحدة الخاصة بي؟
-
12-12-2019 - |
سؤال
أريد تجاوز ملف Sidebar.phtml الخاص بوحدة قائمة الرغبات في الوحدة الخاصة بي.
فأرشدوني.
شكرًا،
المحلول
أعتقد أنك تريد التغيير sidebar.phtml
.
قم بإنشاء ملف تخطيط جديد في الوحدة النمطية المخصصة:
في هذه الحالة، تحتاج إلى إنشاء ملف تخطيط الواجهة الأمامية customwishlist.xml
من هذه الوحدة المخصصة مثل هذا.
<?xml version="1.0" ?>
<config>
<modules>
<Amit_Custommodule>
<version>1.0.0</version>
</Amit_Custommodule>
</modules>
<!-- start of routers
-->
<frontend>
<layout>
<updates>
<custommodule>
<file>customwishlist.xml</file>
</custommodule>
</updates>
</layout>
</frontend>
</config>
تغيير ملف القالب في ملف التخطيط الجديد
ثم على customwishlist.xml
باستخدام الملف siderbar.phtml
الاسم والاستخدام setTemplate
قالب مجموعة الوظائف
<?xml version="1.0"?>
<layout version="0.1.0">
<!--
Default layout, loads most of the pages
-->
<default> <!-- wishlist_sidebar sidebar block name define at wishlist.xml -->
<reference name="wishlist_sidebar">
<action method="setTemplate"><template>youpath/customsider.phtml</template></action>
</reference>
</default></layout>
لا تنتمي إلى magento.stackexchange