Welcome to Geeklog, Anonymous Sunday, October 06 2024 @ 12:27 pm EDT

Geeklog Forums

staticpage centerblock not displaying on all story pages


Status: offline

worldfooty

Forum User
Full Member
Registered: 01/13/09
Posts: 162
Location:Mostly Adelaide, South Australia, Australia
Hi,

I created a staticpage, set it to Centerblock: check, Position: Top of Page: and Topic: All but it only appears on my topic home pages.

Shouldn't it appear for all stories under all topics, i.e. go to a specific story and it'll still be there? I thought it worked that way for me when I last tried this 3 years ago.

Or am I imagining things!?

Cheers,
Brett
 Quote

Status: offline

::Ben

Forum User
Full Member
Registered: 01/14/05
Posts: 1569
Location:la rochelle, France
Hi Brett,

You can solve this by adding to public_html/layout/professional/article/article.thtml a {mypage} variable:

Text Formatted Code

        {mypage}  
        {formatted_article}
        <div class="floatleft" style="width:50%;">{whats_related}</div>
        <div class="floatleft" style="width:50%;">{story_options}</div>
        <div class="clearboth">{trackback}</div>
        {commentbar}


and set the variable in CUSTOM_templateSetVars function in your system/lib-custom.php file

Text Formatted Code
 
function CUSTOM_templateSetVars($templatename, &$template)
{
    // define a {hello_world} variable available in header.thtml and
    // a {hello_again} variable available in the story templates

    switch ($templatename) {
    case 'header':
        $template->set_var('hello_world', 'Hello, world!');
        break;

    case 'storytext':
    case 'featuredstorytext':
    case 'archivestorytext':
            if (PLG_getItemInfo('staticpages', 'mypage', 'id') == 'mypage') {
            $template->set_var('mypage', PLG_getItemInfo('staticpages', 'mypage', 'excerpt'));
                }
        break;
    }
}


Make sure your page id you want to display is mypage and it must be working.

Ben
I'm available to customise your themes or plugins for your Geeklog CMS
 Quote

Status: offline

worldfooty

Forum User
Full Member
Registered: 01/13/09
Posts: 162
Location:Mostly Adelaide, South Australia, Australia
OK thanks. So maybe I imagined the functionality and need to customise if I want it bad enough. I'll have to weight it up.

Thanks!
 Quote

All times are EDT. The time is now 12:27 pm.

  • 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