Từ những gì tôi hiểu bạn không thể sử dụng ifconfigkhi đang di chuyển. Trong lớp Magento\Framework\View\Layout\Reader\Block.phpcó một kiểm tra cho thuộc tính ifconfig:
$configPath = (string)$currentElement->getAttribute('ifconfig');
nguồn:
https://github.com/magento/magento2/blob/2.3-develop/lib/iternal/Magento/Framework/View/Layout/Reader/Block.php
Tuy nhiên, trên khối di chuyển không thực sự kiểm tra ifconfigthuộc tính:
protected function scheduleMove(Layout\ScheduledStructure $scheduledStructure, Layout\Element $currentElement)
{
$elementName = (string)$currentElement->getAttribute('element');
$destination = (string)$currentElement->getAttribute('destination');
$alias = (string)$currentElement->getAttribute('as') ?: '';
if ($elementName && $destination) {
list($siblingName, $isAfter) = $this->beforeAfterToSibling($currentElement);
$scheduledStructure->setElementToMove(
$elementName,
[$destination, $siblingName, $isAfter, $alias]
);
} else {
throw new \Magento\Framework\Exception\LocalizedException(
new \Magento\Framework\Phrase('Element name and destination must be specified.')
);
}
return $this;
}
https://github.com/magento/magento2/blob/2.3-develop/lib/iternal/Magento/Framework/View/Layout/Reader/Move.php#L49
Trong Theroy, bạn không cần ifconfig khi đang di chuyển nếu đã có ifconfig trên khối vì khối sẽ không được hiển thị và do đó không được di chuyển.
Hy vọng rằng có ý nghĩa.