Welcome to Geeklog, Anonymous Sunday, December 22 2024 @ 11:14 am EST
Geeklog Forums
Different theme in Static Pages
Status: offline
fakestar
Forum User
Chatty
Registered: 03/15/06
Posts: 37
hi, where can i edit or create a theme for static pages?
i want total different page of "normal" view from my index page, i have been pasting all HTML code i want chosing "blank page" but i guess there is easy way creating a theme just for static pages, am i right?
Thanks in advance!
i want total different page of "normal" view from my index page, i have been pasting all HTML code i want chosing "blank page" but i guess there is easy way creating a theme just for static pages, am i right?
Thanks in advance!
7
6
Quote
Status: offline
Dirk
Site Admin
Admin
Registered: 01/12/02
Posts: 13073
Location:Stuttgart, Germany
The content of a static page is usually sandwiched between the blockheader.thtml and blockfooter.thtml template files. You can override that by setting
or something like that in your theme's functions.php file to make it use your own template files (mystaticpageheader.thtml in the above example).
See this post for some background information.
bye, Dirk
Text Formatted Code
$_BLOCK_TEMPLATE['_staticpages_block'] = 'mystaticpageheader.thtml,mystaticpagefooter.thtml';See this post for some background information.
bye, Dirk
9
7
Quote
Status: offline
fakestar
Forum User
Chatty
Registered: 03/15/06
Posts: 37
it doesn't work. Now is appearing two headers, original and the one i created.
Same with footer.
Nothing to do with index.php of /staticpages/ ?
The code of my functions.php:
$_IMAGE_TYPE = 'png';
$result = DB_query ("SELECT onleft,name FROM {$_TABLES['blocks']} WHERE is_enabled = 1");
$nrows = DB_numRows ($result);
for ($i = 0; $i < $nrows; $i++) {
$A = DB_fetchArray ($result);
if ($A['onleft'] == 1) {
$_BLOCK_TEMPLATE[$A['name']] = 'blockheader-left.thtml,blockfooter-left.thtml';
} else {
$_BLOCK_TEMPLATE[$A['name']] = 'blockheader-right.thtml,blockfooter-right.thtml';
}
}
$_BLOCK_TEMPLATE['_msg_block'] = 'blockheader-message.thtml,blockfooter-message.thtml';
$_BLOCK_TEMPLATE['customlogin'] = 'customlogin-header.thtml,customlogin-footer.thtml';
$_BLOCK_TEMPLATE['whats_related_block'] = 'blockheader-related.thtml,blockfooter-related.thtml';
$_BLOCK_TEMPLATE['story_options_block'] = 'blockheader-related.thtml,blockfooter-related.thtml';
$_BLOCK_TEMPLATE['_staticpages_block'] = 'mystaticpageheader.thtml,mystaticpagefooter.thtml';
?>
Same with footer.
Nothing to do with index.php of /staticpages/ ?
The code of my functions.php:
Text Formatted Code
<?php$_IMAGE_TYPE = 'png';
$result = DB_query ("SELECT onleft,name FROM {$_TABLES['blocks']} WHERE is_enabled = 1");
$nrows = DB_numRows ($result);
for ($i = 0; $i < $nrows; $i++) {
$A = DB_fetchArray ($result);
if ($A['onleft'] == 1) {
$_BLOCK_TEMPLATE[$A['name']] = 'blockheader-left.thtml,blockfooter-left.thtml';
} else {
$_BLOCK_TEMPLATE[$A['name']] = 'blockheader-right.thtml,blockfooter-right.thtml';
}
}
$_BLOCK_TEMPLATE['_msg_block'] = 'blockheader-message.thtml,blockfooter-message.thtml';
$_BLOCK_TEMPLATE['customlogin'] = 'customlogin-header.thtml,customlogin-footer.thtml';
$_BLOCK_TEMPLATE['whats_related_block'] = 'blockheader-related.thtml,blockfooter-related.thtml';
$_BLOCK_TEMPLATE['story_options_block'] = 'blockheader-related.thtml,blockfooter-related.thtml';
$_BLOCK_TEMPLATE['_staticpages_block'] = 'mystaticpageheader.thtml,mystaticpagefooter.thtml';
?>
5
8
Quote
Status: offline
Dirk
Site Admin
Admin
Registered: 01/12/02
Posts: 13073
Location:Stuttgart, Germany
Can't explain why you would be seeing two headers / footers (doesn't happen for me), but for static pages in a centerblock, the code should actually read
$_BLOCK_TEMPLATE['_staticpages_centerblock'] = '...';
bye, Dirk
$_BLOCK_TEMPLATE['_staticpages_centerblock'] = '...';
bye, Dirk
8
6
Quote
All times are EST. The time is now 11:14 am.
- Normal Topic
- Sticky Topic
- Locked Topic
- New Post
- Sticky Topic W/ New Post
- Locked Topic W/ New Post
- View Anonymous Posts
- Able to post
- Filtered HTML Allowed
- Censored Content