跳至內容
選單
此問題已被標幟
4 回覆
11304 瀏覽次數

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
3月 24
2862
1
4月 20
7849
4
2月 24
32606
0
1月 25
1035
2
4月 24
4780