diff options
| author | spiderr <spider@viovio.com> | 2013-03-02 12:41:14 -0500 |
|---|---|---|
| committer | spiderr <spider@viovio.com> | 2013-03-02 12:41:14 -0500 |
| commit | b065614ffa87ef813999a952e4d0e048fd38836f (patch) | |
| tree | 0b1e439d9d8a863364b89b0718f3d6548d5ce9da | |
| parent | e099c6ed6b62c4665d3628024291584a189cb684 (diff) | |
| download | liberty-b065614ffa87ef813999a952e4d0e048fd38836f.tar.gz liberty-b065614ffa87ef813999a952e4d0e048fd38836f.tar.bz2 liberty-b065614ffa87ef813999a952e4d0e048fd38836f.zip | |
setCanonicalLink for displaying with structure_id
| -rw-r--r-- | display_structure_inc.php | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/display_structure_inc.php b/display_structure_inc.php index d70d1c6..67beeac 100644 --- a/display_structure_inc.php +++ b/display_structure_inc.php @@ -11,12 +11,13 @@ /** * required setup */ - global $gContent; - include_once( LIBERTY_PKG_PATH.'lookup_content_inc.php' ); - if( is_object( $gContent ) && $gContent->isValid() ) { - $gBitSystem->setBrowserTitle( $gStructure->getRootTitle().' : '.$gContent->getTitle() ); - include $gContent->getRenderFile(); - } else { - $gBitSystem->fatalError( tra( 'Page cannot be found' ), NULL, NULL, HttpStatusCodes::HTTP_NOT_FOUND ); - } -?> +global $gContent; +include_once( LIBERTY_PKG_PATH.'lookup_content_inc.php' ); +if( is_object( $gContent ) && $gContent->isValid() ) { + $gBitSystem->setBrowserTitle( $gStructure->getRootTitle().' : '.$gContent->getTitle() ); + $gBitSystem->setCanonicalLink( $gContent->getDisplayUri() ); + include $gContent->getRenderFile(); +} else { + $gBitSystem->fatalError( tra( 'Page cannot be found' ), NULL, NULL, HttpStatusCodes::HTTP_NOT_FOUND ); +} + |
