anewt-developers team mailing list archive
-
anewt-developers team
-
Mailing list archive
-
Message #00067
[Branch ~uws/anewt/anewt.uws] Rev 1688: [page] Support for 'favicon' on AnewtPage
------------------------------------------------------------
revno: 1688
committer: Wouter Bolsterlee <uws@xxxxxxxxx>
branch nick: anewt.uws
timestamp: Sun 2009-07-19 21:44:45 +0200
message:
[page] Support for 'favicon' on AnewtPage
The 'favicon' property can be set to a URI of an .ico image.
This will be used as the favicon for the page.
modified:
page/module.doc.xml
page/page.lib.php
=== modified file 'page/module.doc.xml'
--- page/module.doc.xml 2008-12-30 22:11:22 +0000
+++ page/module.doc.xml 2009-07-19 19:44:45 +0000
@@ -42,6 +42,9 @@
<anewt:property name="title">
The title of the page
</anewt:property>
+ <anewt:property name="favicon">
+ The uri of the favicon of the page. Optional, defaults to <code>null</code>.
+ </anewt:property>
<anewt:property name="show-dublin-core">
Whether to include Dublin Core metadata. Enabled by default.
</anewt:property>
=== modified file 'page/page.lib.php'
--- page/page.lib.php 2009-07-19 19:41:36 +0000
+++ page/page.lib.php 2009-07-19 19:44:45 +0000
@@ -64,6 +64,8 @@
'title' => null,
+ 'favicon' => null,
+
'show-dublin-core' => true,
'generator' => 'Almost No Effort Web Toolkit (Anewt)',
@@ -472,6 +474,16 @@
$this->_head->append_children($this->_javascripts);
+ /* Favicon */
+
+ $favicon = $this->_get('favicon');
+ if (!is_null($favicon))
+ {
+ assert('is_string($favicon);');
+ $this->_head->append_child(ax_link_favicon($favicon));
+ }
+
+
/* Body content */
if ($this->_get('blocks'))
--
lp:anewt
https://code.launchpad.net/~uws/anewt/anewt.uws
Your team Anewt developers is subscribed to branch lp:anewt.
To unsubscribe from this branch go to https://code.launchpad.net/~uws/anewt/anewt.uws/+edit-subscription.