تخطي للذهاب إلى المحتوى
القائمة
لقد تم الإبلاغ عن هذا السؤال
4 الردود
11271 أدوات العرض

I was trying to replace classes with position="attributes" but it dosen't work. it seems to be a bug.

This dosen't works

  <xpath expr="//div[@id='mid-header-bottom-left']" position="attributes">    <attribute name="class">"col-md-3 col-sm-2 oe_structure"</attribute>  </xpath>

This Does

  <xpath expr="//div[@id='mid-header-bottom-left']" position="attributes">    <attribute name="name">this shows</attribute>  </xpath>

So , 

  • The selector is correct

  • The attribute "name" can be assigned

  • The attribute "class" cannot be replaced

الصورة الرمزية
إهمال
الكاتب

Cannot comment on ur reply @hilar AK so , i write here. ur anser is same with me

Hilar's answer isnot same as yours. There is no double quotes in the new class

You don't need to give CSS within quotes while using attributes tag, where attribute tag itself takes it as a string.

أفضل إجابة

Try


  <xpath expr="//div[@id='mid-header-bottom-left']" position="attributes">    <attribute name="class">col-md-3 col-sm-2 oe_structure</attribute>  </xpath>
الصورة الرمزية
إهمال
الكاتب أفضل إجابة

thanks finally got it working , it is due to inheritance : the template with override with same css by other module developed by other dev

الصورة الرمزية
إهمال
المنشورات ذات الصلة الردود أدوات العرض النشاط
2
مارس 24
2836
1
أبريل 20
7825
4
فبراير 24
32576
0
يناير 25
1018
2
أبريل 24
4760