Blocks Issue?

Events happening in the community are now at Drupal community events on www.drupal.org.
davesf-1's picture

Greetings,

I am messing around with an OpenPublic instance prototyping whether it could be an alternative to our Innovation Office's main site. I have the prototype up at http://innovatesf.org/innovation and have posted the files and db at http://innovatesf.org/innovation/innovation_site.tar.gz so you could have a look under the hood. (I cleansed the sites/default/settings.php file). The file will update daily via cron.

I have had a number of minor issues with OP mostly around CSS but am now facing one that I cannot seem to solve...yet.

  1. I created a new Content Type (Projects)
  2. I created a page view of Projects
  3. I created a block view of Projects

For the life of me, I cannot get the block to show the Project page.

Is it me or OP???

Thanks much,

--
Dave Geller

Business Analyst
The Innovation Office - Dept. of Technology
City & County of San Francisco

Comments

Context

zoon_unit's picture

Are you using the Context module interface to control block visibility? That's how OpenPublic does it.

Yeah, I created a Context

davesf-1's picture

Yeah, I created a Context that when the "Projects Page View" is the condition met then it reacts with the "Projects Block"

Hi DaveSF

MataHari's picture

Sorry this comment is not answering your question, but I had to ask. How did you custom-write the nav bar category names? I downloaded openpublic last night and played around with it, and couldn't figure out how to change the menu names, for example, instead of 'blog', i wanted it to say 'news', and have that reflected in the URL as well.

I'm very new to Drupal, so I hope you pardon the newbie question.

Lastly, how did you remove the default white links at the very top of the site (in the skinny black horizontal bar) - I wanted to hide that as well.

Thank you so much.

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

(<>..<>)

Twitter: RomyEatsDrupal

Hi. Hmm...for much of the

davesf-1's picture

Hi. Hmm...for much of the menu bar I likely either abandoned some of the content by disabling it or renamed the node in the content area. Some of the links were hard to remove e.g. Leadership I actually had to disable the context for that one. I forgot which one now but another link needed to be disabled in the modules. It just takes diligence to track down what you want to change.

For the top black bar that was accomplished by using the permissions under people. Specifically you are looking at the anonymous site so you would remove appropriate permissions there.

If you can please feel free to download my site and you can dig through it to compare to yours. It would help you in your learning of Drupal.

Problem with the second sidebar

aellison's picture

I downloaded and took a look at your site. Created a context for the project page and added the project block. The project block will show in all regions except sidebar_second.

Took a look inside the page object and sidebar_second is there, but it's not being rendered onto the page. Changed it's name to sidebar_two and it worked. Will investigate further if I get some time this weekend.

Nice site:)

Hi Aaron, Wow that's great

davesf-1's picture

Hi Aaron,

Wow that's great that you got it to show. I did experience the block showing in other regions but that was after my initial posting. Can you walk me through what you did to make it appear. By page object did you set up a Page Layout for it? Did you change the name of the block view? Anyway, thanks again!

Dave

Fix

aellison's picture

In the theme's .info file at "profile/openpublic/openpublic_theme/openpulic_theme.info" change the line

regions[sidebar_second] = Second sidebar

to:

regions[sidebar_two] = Second sidebar

Then open "profile/openpublic/openpublic_theme/page/page.tpl.php"

and change these two lines:

<?php
if ($page['sidebar_second']):
?>

<?php
print render($page['sidebar_second']);
?>

to this:

<?php
if ($page['sidebar_two']):
?>

<?php
print render($page['sidebar_two']);
?>

This is not fixing the underlying problem, but it will get you up and running for now.

Hi Aaron, Let me start off

davesf-1's picture

Hi Aaron,

Let me start off with thanking you for taking a look at this issue. I have some bad news to report. When I made the changes and got the block to show on Projects, it blew away all the blocks for the native OP nodes/views. So I went into the contexts and added the various blocks to the second sidebar again. The problem is that now they are stretching all the way across the content. So, I am going to have to change back for now until I can get the CSS classes into the blocks and redo the work. Did you experience this too or did one of my colleagues make some changes to my site before we took off on Friday?

Thanks again,

Dave.

PS for anyone following along at home let me clarify some paths from earlier posts:

"drupal root"/profiles/openpublic/themes/openpublic_theme/openpublic_theme.info
"drupal root"/profiles/openpublic/themes/openpublic_theme/page/page.tpl.php

Found it.

aellison's picture

Disregard the previous fix, I found your problem. There is a context called "no_sidebars" that is disabling second sidebar on the projects page.

"no_sidebars" did it. What

davesf-1's picture

"no_sidebars" did it. What is disconcerting is that there is no way I created that context - I hope it is not default OP behavior to create a context or add anything newly created to that context. Time will tell as the site continues to develop.

Thanks again for your help and teaching me a bit about contexts and blocks!

It's an OP context

aellison's picture

I checked my own install, and this context was there with "projects" as the path. It was just a coincidence that you chose to name your view page "projects," while there was a context for that path already in there.

Keep us posted on your progress, very cool site you're working on!

So I am having one other

davesf-1's picture

So I am having one other strangeness with this block.

When I create the block and display it for some reason OP is adding the H4 tag to it thus blowing away the same formatting that the other blocks have. The strange thing is that when I preview the block at the bottom of the view, it looks correct but when it is saved and displayed on the page...it has the H4.

I have been trying but can't seem to track down what is causing it.

scheduler object

mstornelli's picture

HI, sorry by my english. I just configured openpublic for not goverment use, i want to install scheduler module but no date option appear when try to configure content type. Can you help me? Thanks

No Blocks Showing

tiwiex's picture

Hello,
Trying out an Open Public Instance for a client. I have enabled various blocks in many regions and none show. I just installed GTranslate and the block too does not show. I have tried various regions.

I have never used context but i see from the thread that this really controls the blocks. Do I need to do something here to fix it?

Thank you.

latest news in open public front page

ninjaz's picture

hello everyone.

i would like to ask anybody know how to replace latest news block in the Open Public front page with aggregator rss feed block. tq

already solve

ninjaz's picture

already solve. tq

OpenPublic

Group organizers

Group notifications

This group offers an RSS feed. Or subscribe to these personalized, sitewide feeds: