Sidebar hides from Layout

Feed 13 posts, 4 voices

Aug 5, 2008 11:41
Avatar
6 posts

Hi,

I just started using Frog and I really enjoy it. However, I encountered the first problem which requires your help.

  • Homepage (Text) -- Company (Text) -- People (Subpages) --- Employee 1 (Subpages)

On homepage, the sidebar shows the text. On company, the sidebar does not show the text On People, the sidebar shows a list of all subpages of people (based on http://www.madebyfrog.com/docs/how-to/create-a-sitemap.html) On Employee 1, the sidebar does not show a list of all subpages of people (based on http://www.madebyfrog.com/docs/how-to/create-a-sitemap.html)

Is there any hint available how I can fix this?

Thanks a lot, Thomas

 
Aug 5, 2008 12:24
Avatar
963 posts

Hi Thomas --

There may be other ways (maybe search the forum for "navigation"?), but you can see one solution in the sidebar to my CSS Play page, under "Navigation". It works to three levels, IF you are NOT using ".html" terminations. You can get the code for it from this forum post.

Let us know how you get on!

 
Aug 5, 2008 14:43
Avatar
6 posts

Thanks for your reply - Unfortunately, the problem is that the sidebar just does not appear. I added content to the sidebar, and it does show up. In addition, this happens only certain pages.

 
Aug 5, 2008 16:58
Avatar
390 posts

you should check your layout, on how you display the sidebar ... if it is inherited or not $this->content('sidebar', true); <- the true there mean inherit, so if you do not have a sidebar part it will check for the parent page to get is sidebar part !! like that you can make a general one to be sure to always have one :)

hope that help

 
Aug 6, 2008 09:35
Avatar
6 posts

Indeed,

the second parameter solved the issue regarding the sidebar on subpages. Unfortunately, there is still one problem.

I created a page. I added a sidebar. The sidebar does not appear on the page. I removed it, I added it, I edited it - but the sidebar hides somewhere. This must be something in the code (PHP).

Thomas

 
Aug 6, 2008 10:07
Avatar
963 posts

This is odd, Thomas! If "Layout" you are using for the page ("Normal"?) has this code....

<div id="sidebar">
    <?php echo $this->content('sidebar', true); ?> 
</div> <!-- end #sidebar -->

...or something like it, then the sidebar cannot hide! :) Can you check your Layout? (When you are editing a page, the "Layout" drop-down is just above the "Save" button.)

 
Aug 6, 2008 10:14
Avatar
6 posts

Yes, I'm a little frustrated right now. The sidebar is included in my layout and problems appears on some, but not every page. Therefore, I assume the problem is a little bit more tricky :(

&ltdiv class="span-6 push-1 last" id="sidebar"> &lt?php echo $this->content('sidebar', true); ?> &lt/div>

 
Aug 6, 2008 10:33
Avatar
6 posts

Problem solved: Sidebar != sidebar

Nasty, nasty :-)

 
Aug 6, 2008 10:46
Avatar
963 posts

Nasty indeed! Glad you found the problem -- I was going to say "Check the spelling" but ... that would have been too easy. ;) Hope we get to see the site when it goes live!

 
Aug 6, 2008 11:38
Avatar
6 posts

The Problem is that Frog automaticly capitalized the name of each part, which I didn't know. The input should be transformed to lowercase automaticly

 
Aug 9, 2008 12:37
Avatar
315 posts

I'm having a problem with a section of my sidebar not showing up. I have included the same line of code in the sidebar section of each article, but it only works in one. I also have the WMD editor in place and, the one page that the sidebar works, the WMD editor doesn't show up. The pages where the sidebar doesn't work, the WMD editor does show up. I don't know what's going on, or what could be causing this.

<?php $this->includeSnippet('article-rate') ?>

Is the code I have in the sidebar of each article and:

<ul class="rate">
<li><!-- AddThis Button BEGIN -->
<script type="text/javascript">addthis_pub  = 'mtylerb';</script>
<a href="http://www.addthis.com/bookmark.php" onmouseover="return addthis_open(this, '', '[URL]', '[TITLE]')" onmouseout="addthis_close()" onclick="return addthis_sendto()"><img src="http://s9.addthis.com/button1-share.gif" width="125" height="16" border="0" alt="" /></a><script type="text/javascript" src="http://s7.addthis.com/js/152/addthis_widget.js"></script>
<!-- AddThis Button END -->
</li>
</ul>

Is the code I have in that snippet. Any ideas? You can see it not working at my article and working at my other article.

 
Aug 9, 2008 12:53
Avatar
315 posts

I also just noticed that the Archive by Month also does not show up in that first link. I'm not sure what would stop it. The code in the sidebar has changed, I attempted to see if that was a problem, but it's not. The new scripts is:

<h3>Share</h3>
<ul>
<li>
<!-- AddThis Button BEGIN -->
<script type="text/javascript">
addthis_pub  = 'mtylerb';
addthis_brand = 'Tyler's Site';
addthis_options = 'delicious, digg, email, favorites, facebook, fark, google, live, myweb, 
myspace, newsvine, reddit, slashdot, stumbleupon, technorati, twitter, more'
</script>
<a href="http://www.addthis.com/bookmark.php" onmouseover="return addthis_open(this, '', 
'[URL]', '[TITLE]')" onmouseout="addthis_close()" onclick="return addthis_sendto()">Share 
This Article</a><script type="text/javascript" 
src="http://s7.addthis.com/js/152/addthis_widget.js"></script>
<!-- AddThis Button END -->
</li>
</ul>

Any ideas?

 
Aug 9, 2008 14:11
Avatar
315 posts

I have updated the code changes to r162. The problem is still affecting me.

 
Aug 10, 2008 01:56
Avatar
315 posts

I have worked around this issue by putting the links in the layout of my theme. I made a simple if statement to test and see if there was "extended" content. If there was, then it puts the links under the sidebar section. :-) I would still like to know why the original didn't work. It now has to look like:

    <?php if ($this->hasContent('extended')) { ?>
    <h3>Share This Article</h3>
    <ul>
        <li>
        <!-- AddThis Button BEGIN -->
        <a href="http://www.addthis.com/bookmark.php" onclick="
addthis_url   = location.href; addthis_title = document.title; return addthis_click(this);" 
class="external_link"><img src="http://s9.addthis.com/button1-share.gif" style="width:125;height:16;
border:0;" alt="Bookmark and Share" /></a> <script type="text/javascript">var 
addthis_pub = 'mtylerb';addthis_brand = 'Tyler's Site';</script><script type="text/javascript" 
src="http://s9.addthis.com/js/widget.php?v=10"></script>  
        <!-- AddThis Button END -->
        </li>
        <li>
        <script>function fbs_click() {u=location.href;t=document.title;window.open
('http://www.facebook.com/sharer.php?u='+encodeURIComponent(u)+'&
t='+encodeURIComponent(t),'sharer','toolbar=0,status=0,width=626,height=436');
return false;}</script><style> html .fb_share_link 
{ padding:2px 0 0 20px; height:16px; width:125px;}</style>
<a href="http://www.facebook.com/share.php?u=<?php echo $this->url();?>" 
onclick="return fbs_click()" target="_blank" class="fb_share_link"><img 
src="http://static.ak.fbcdn.net/images/share/facebook_share_icon.gif?0:26981" 
style="border:0px;" /><font style="color:#4444FF;">Share on Facebook</font></a>
        </li>
        <li>
        <a href="http://www.stumbleupon.com/submit?url=<?php echo $this->url();?>"> 
<img style="border:0px;" 
src="http://cdn.stumble-upon.com/images/120x20_thumb_gray.gif" alt=""></a>
        </li>
        <li>
        <script type="text/javascript">
        digg_skin = 'compact';
        digg_bgcolor = '#f7f7f2';
        digg_url = '<?php echo $this->url();?>';
        digg_window = 'new';
        </script>
        <script src="http://digg.com/tools/diggthis.js" type="text/javascript"></script> 
        </a>
        </li>
    </ul>
<?php }; ?>

Anyway, at least it works.