pug - Output php directly into a jade template -


i have jade template needs bit of php populate checkbox. below code works fine if checkbox needs checked need remove attribute if $options['virtual-host'] not set. how can add raw attributes element without jade trying me out?

 input(type="checkbox",name="options[virtual-host]",value="1",id="virtual-host",    checked!="<?php echo ( isset( $options['virtual-host'] )     && $options['virtual-host'] ) ? 'checked' : '';?>") 

the end output needs this:

<input type="checkbox" name="options[virtual-host]" value="1"    id="virtual-host" <?php echo ( isset( $options['virtual-host'] )    && $options['virtual-host'] ) ? 'checked' : '';?>/> 

check these: writing pure html in jade

| <input type="checkbox" name="options[virtual-host]" value="1"  id="virtual-host" <?php echo ( isset( $options['virtual-host'] )  && $options['virtual-host'] ) ? 'checked' : '';?>/> 

should work, not sure.

why dont try pure jade/js solution? im not feeling these php there.


Comments

Popular posts from this blog

linux - xterm copying to CLIPBOARD using copy-selection causes automatic updating of CLIPBOARD upon mouse selection -

c++ - qgraphicsview horizontal scrolling always has a vertical delta -