1
我已經看到了一個自定義插件的奇怪行爲。它的皮膚生成一些HTML,它工作正常。只要我把這個小部件放到頁面上,它只會在頁面刷新後纔可見。當我嘗試將小部件拖到另一個位置時也是如此。Impresspages Widget在拖放後消失
有沒有人遇到同樣的問題?我不確定它是一個錯誤還是我可能會錯過我的代碼中的某些東西。
[編輯]沒有與ipContent(問題) - > getCurrentPage() - >的getId(),它是在執行任何拖放動作後NULL [編輯]
這是我的皮膚文件:
<div>
<div class="form-group">
<div class="checkbox">
<label>
<input id="auth-email-check-nutzung" type="checkbox"><?php echo ipSlot('text', array(
'id' => 'nutzungsbedingungen_' . ipContent()->getCurrentPage()->getId(),
'default' => 'Ich stimme den <a href="#">Nutzungebedingungen</a> zu.',
'attributes' => array(
'id' => 'auth-email-check-nutzung-text'
)
)); ?>
</label>
</div>
<div class="checkbox">
<label>
<input id="auth-email-check-daten" type="checkbox"><?php echo ipSlot('text', array(
'id' => 'datenschutz' . ipContent()->getCurrentPage()->getId(),
'default' => 'Ich stimme der <a href="#">Datenschutzerklärung</a> zu.',
'attributes' => array(
'id' => 'auth-email-check-daten-text'
)
)); ?>
</label>
</div>
</div>
<form class="form" role="form">
<div class="form-group">
<label for="inputEmail1" class="control-label">Email</label>
<input type="email" class="form-control" id="inputEmail1" placeholder="Email">
</div>
<div class="form-group">
<?php if ((ipIsManagementState())) :?>
<?php
// Use a simulated Button to edit text and prevent any default button event
// for user friendly inline editing
echo ipSlot('text', array(
'id' => 'button' . ipContent()->getCurrentPage()->getId(),
'default' => 'senden',
'tag' => "div",
'class' => 'btn btn-danger auth-button btn-block',
'attributes' => array(
'data-target' => 'bs-button',
'id' => 'auth-email-button-div'
)
)); ?>
<?php endif; ?>
<?php if (!(ipIsManagementState())) :?>
<?php
// Display real Button only on the live page with the contents of ipSlot :
// 'id' => 'button' . ipContent()->getCurrentPage()->getId()
echo ipSlot('text',array(
'id' => 'button' . ipContent()->getCurrentPage()->getId(),
'tag' => "button",
'class' => 'btn btn-danger btn-block',
'attributes' => array(
'data-target' => 'bs-button',
'id' => 'auth-email-button',
'disabled' => 'disabled'
)
)); ?>
<?php endif; ?>
</div>
</form>
</div>
在此先感謝。
謝謝,我只是注意到你的評論。 – 2014-12-04 10:27:57