Posted by jhodgdon on January 24, 2017 at 6:57pm
Start:
2017-02-16 10:00 - 12:00 America/Los_Angeles Organizers:
Event type:
User group meeting
We hope you can join us for the next meeting of the Spokane Drupal User Group!
- When
- Thursday, February 16, 2017, 10 AM to noon
We meet on the 2nd or 3rd Thursday of most months at this time/location. Log in and join the Spokane Drupal User Group (see sidebar on https://groups.drupal.org/spokane-wa ) to be notified of future meetings, events, and discussions (typically just a few email messages per month). - Where
- Spokane County Library - Argonne branch, 4322 N. Argonne Road, Millwood. We are currently meeting in the small conference room at the library. From the hallway, go into the library proper, past the checkout/information desk, take a right and you'll see the room on the right.
- To be reminded, sign up!
- To receive an email reminder closer to the date of the meeting, log in and click the "Sign up" button; log in and click "Cancel signup" at a later time if your schedule changes and you can no longer come. There's no obligation to come if you sign up (but we hope you will!). There's also no obligation to sign up in order to come (it's up to you if you want a reminder or not). However, the meeting could be canceled if the organizer isn't sure anyone is coming.
- What
- We spend two hours in a question and answer format, with the participants around a table and a laptop on a projector. Come with questions about a project you're working on, something you've learned that you'd like to share with others, a desire to improve Drupal in some way (documentation, programming, design, marketing etc.), or a desire to help others with their projects and questions. Or just come and listen and observe.
- Who
- Everyone is welcome -- the only prerequisite is having some interest in Drupal. This group is usually 5-10 friendly people, with experience levels ranging from novice to expert, so you'll fit right in. Because of the size of the group, you will have time to share something you've learned, or get your questions answered, or both!
Comments
Meeting notes
What we talked about today:
http://pnwdrupalsummit.org/2017
Shawn has an extra ticket and a hotel reservation that could be used by someone... maybe he will post a message here?
And in Vienna in September: https://events.drupal.org/vienna2017
https://groups.drupal.org/belgian-drupal-community
and probably meet them!
page__jon_special_page
. You can put whatever you want in here, but it has to start withpage__
. For more information on theme suggestions in Drupal, see https://www.drupal.org/docs/7/theming/template-theme-hook-suggestionstemplates
directory. Rename itpage--jon-special-page.tpl.php
(the underscore characters in the theme suggestion become hyphens in the file name, and then it needs a .tpl.php extension on the name).So far, so good! But we actually want different regions on this page, not the standard Sidebar first, Sidebar second, and Content regions. So, we can edit the custom_theme.info file, and add lines like this:
regions[special_page_left] = Special Page Left
...
(If you're using the Omega theme, you'll also need to create a Zone for your Region(s), and add that to the zones section of your info file, and then also go to the Settings for your Omega sub-theme, and make sure your region/zone gets displayed.)
Then we need to edit the new template file to display these regions in place of the standard ones (or display the zones, if you're using Omega). For instance, the Sidebar First region is normally printed out with code like this:
<?php if ($page['sidebar_first']): ?>
<div id="sidebar-first" class="column sidebar"><div class="section">
<?php print render($page['sidebar_first']); ?>
</div></div> <!-- /.section, /#sidebar-first -->
<?php endif; ?>
The Content region is a "bit" more complex, about 30 lines of code. Anyway, what you need to do is get rid of the regions that you don't want to print in these special pages, and substitute the ones you do. So for the Special Page Left region, you would put in lines like:
<?php if ($page['special_page_left']): ?>
<div id="special-page-left" class="SOME CSS CLASSES HERE"><div class="section">
<?php print render($page['special_page_left']); ?>
</div></div> <!-- /.section, /#special-page-left -->
<?php endif; ?>
Finally, you'll need to clear the cache again (to recognize the new regions), then edit your context to add a Blocks reaction, and put blocks in these new regions (which should show up as regions in the Blocks dialog in Context).
You can also add some CSS to your custom theme to style the new regions.
Fun! It works, too!
You could probably also use the Themekey module:
https://www.drupal.org/project/themekey
Or Panels
https://www.drupal.org/project/panels
But Context is pretty flexible, and pretty straightforward, and Panels has a lot of overhead.
You could also use the Delta module (https://www.drupal.org/project/delta) to add some more theme-based reactions to Context, but it's a bit complicated.
I will probably post it as a module on drupal.org sometime soon, and/or write it up as a blog post on poplarware.com. If so, I'll add a note to that other post, so if you log in I think you can "follow" that post to get notified when there is an update. Or if you use Twitter, I'm @poplarware (most likely I'll Tweet if I make a post or a module).
Drupal programmer - http://poplarware.com
Drupal author - http://shop.oreilly.com/product/0636920034612.do
Drupal contributor - https://www.drupal.org/u/jhodgdon
Partially multilingual site
I wrote up a blog post on that last item from the meeting notes:
http://poplarware.com/article/partially-multilingual-seo
Drupal programmer - http://poplarware.com
Drupal author - http://shop.oreilly.com/product/0636920034612.do
Drupal contributor - https://www.drupal.org/u/jhodgdon