I am trying to implement content flow in my zf application. And while loading its attributes, it requires one extra attribute to be defined.
<script type="text/javascript" src=".." load="white"></script>
To interprete this using zf, i tried
$this -> headScript() -> appendFile("my/path/to/contentflow.js","text/javascript", array("load" => "white"));
But its not working.
How to do this?
Attributes are extra information that provide for the HTML elements. There are lots of predefined attributes in HTML. When the predefined attributes do not make sense to store extra data, custom attributes allow users to create custom data.
This example could be for a retail site with different product categories. The custom attributes allow you to treat elements in particular ways within the JavaScript code for the page, for example when using animated display functions.
You can add custom attributes to a selected element in the Element Settings panel. Add a new custom attribute (button with plus icon) Add a new custom attribute for the selected element. Name (data input field)
Implementing custom attributes in HTML5 is not technically complex in itself, however the real difficulty is in choosing whether it is appropriate to use them in your own projects, and if so how to go about it efficiently.
Zend Framework does not allow such random attributes. If you really have to use them, you have to enable them using
$this -> headScript() -> setAllowArbitraryAttributes(true);
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With