Problem With CGBlog Titles

Have a question or a suggestion about a 3rd party addon module or plugin?
Let us know here.
Locked
JohnnyNM
Forum Members
Forum Members
Posts: 14
Joined: Sat Dec 03, 2011 11:32 pm

Problem With CGBlog Titles

Post by JohnnyNM »

I'm a tad stuck. I'm trying to get the CGBlog detail template title in the page title. I know this should be simple and I've done it before, but I can't find the problem here. I'm not a beginner but I'll happily admit I can miss small errors!
Any help would be appreciated.
John.


Page template is pretty much this:

{global_content name='GLOBAL_header'}
{content}
{global_content name='GLOBAL_footer'}


GLOBAL_header:

{process_pagedata}<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<__html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" >
<head>

{if isset($alt_title)}
<title>{sitename} - {$alt_title}</title>
{else}
<title>{sitename} - {title}</title>
{/if}

{metadata}
{cms_stylesheet}
{global_content name='dynamicbackgroundtext'}
{global_content name='js_lightbox'}
<link rel="stylesheet" href="lightbox/css/lightbox.css" type="text/css" media="screen" />

{literal}
...Google Tracking...
{/literal}

</head>
</__body>
<!-- start header -->
<div class="header">
{Banners category="Paid Adverts Top"}
</div>
<!-- end header -->

<!-- start menu -->
<div class="menu_container">
<div class="menu">
{menu}
</div>
</div>
<!-- end menu -->


<div class="site_container">
<!-- start content -->
<div class="content">

{FrontEndUsers nocaptcha="1"}


GLOBAL_footer:

</div>
<!-- end content -->

<div class="site_footer_links">

<a href="{cms_selflink href='register'}">Register with MoseleyB13.com</a> |
<a href="{cms_selflink href='contact-us'}">Contact Us</a>

<div style="float: right">
...Add This...
</div>

<!-- | Complaints Procedure | Join the Team | Voluntary Vacancies -->
</div>

</div>

<div class="site_footer">
...text footer blurb...
</div>

<__body>
</__html>


And then right at the bottom of the CGBlog Detail Template I've got this:

{assign var='alt_title' value=$entry->title}



----------------------------------------------

Cms Version: 1.10.2

Installed Modules:

CMSMailer: 2.0.2
CMSPrinting: 1.0
FileManager: 1.2.0
MenuManager: 1.7.7
MicroTiny: 1.1.1
ModuleManager: 1.5.3
News: 2.12.3
Search: 1.7
ThemeManager: 1.1.4
CGSimpleSmarty: 1.4.10
CGExtensions: 1.27.4
CGBlog: 1.8.1
Captcha: 0.4.5
Banners: 2.5.1
CGCalendar: 1.8.3
JQueryTools: 1.0.10
CompanyDirectory: 1.12.1
HitCounter: 1.1
FormBuilder: 0.7.1
FrontEndUsers: 1.16.8
Products: 2.16.2
CustomContent: 1.7.3
CGFeedback: 1.5.4
FeuFacebook: 0.9
SelfRegistration: 1.6.14


Config Information:

php_memory_limit:
process_whole_template: false
output_compression: false
max_upload_size: 2000000
default_upload_permission: 664
url_rewriting: none
page_extension:
query_var: page
image_manipulation_prog: GD
auto_alias_content: true
locale:
default_encoding: utf-8
admin_encoding: utf-8
set_names: true


Php Information:

phpversion: 5.3.6
md5_function: On (True)
gd_version: 2
tempnam_function: On (True)
magic_quotes_runtime: Off (False)
E_STRICT: 0
E_DEPRECATED: 0
memory_limit: 32M
max_execution_time: 30
output_buffering: On
safe_mode: Off (False)
file_uploads: On (True)
post_max_size: 8M
upload_max_filesize: 2M
session_save_path: /tmp (1777)
session_use_cookies: On (True)
xml_function: On (True)


Server Information:

Server Api: cgi-fcgi
Server Db Type: MySQL (mysql)
Server Db Version: 5.0.92


----------------------------------------------
Wishbone
Power Poster
Power Poster
Posts: 1368
Joined: Tue Dec 23, 2008 8:39 pm

Re: Problem With CGBlog Titles

Post by Wishbone »

For what you are trying to do, you must keep the <head> and </__body> in your main template.

Example:

Code: Select all

<DOCTYPE>
<__html>
<head>
{global_content name="head"}
</head>
</__body>
{global_content name="header"}
{content}
{global_content name="footer"}
<__body>
</__html>
The system processes the </__body> before the <head>.. This is the reason why you can assign a variable in the blog template and it's used in the head. This is done before compiling all the smarty, and thus needs to be in the main template. If <head> and </__body> aren't found, it just process the template sequentially.
Locked

Return to “Modules/Add-Ons”