From 1e0efb03df0ad2309a3e3bef64c6268a292373b9 Mon Sep 17 00:00:00 2001 From: xue <> Date: Mon, 3 Apr 2006 01:46:46 +0000 Subject: Added BaseUrl property to THead. --- framework/Web/UI/WebControls/THead.php | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'framework/Web/UI/WebControls/THead.php') diff --git a/framework/Web/UI/WebControls/THead.php b/framework/Web/UI/WebControls/THead.php index 40736a92..5c91002b 100644 --- a/framework/Web/UI/WebControls/THead.php +++ b/framework/Web/UI/WebControls/THead.php @@ -96,6 +96,22 @@ class THead extends TControl $this->setViewState('Title',$value,''); } + /** + * @return string base URL of the page. This URL is rendered as the 'href' attribute of tag. Defaults to ''. + */ + public function getBaseUrl() + { + return $this->getViewState('BaseUrl',''); + } + + /** + * @param string base URL of the page. This URL is rendered as the 'href' attribute of tag. + */ + public function setBaseUrl($url) + { + $this->setViewState('BaseUrl',$url,''); + } + /** * @return TMetaTagCollection meta tag collection */ @@ -118,6 +134,8 @@ class THead extends TControl $page=$this->getPage(); $title=$this->getTitle(); $writer->write("\n".THttpUtility::htmlEncode($title)."\n"); + if(($baseUrl=$this->getBaseUrl())!=='') + $writer->write('\n"); if(($metaTags=$this->getMetaTags())!==null) { foreach($metaTags as $metaTag) -- cgit v1.2.3