We are redesigning the homepage to improve navigation and usability. I have met with Marta and created a rough wireframe to portray the ideal look/feel of the new home page. It also explains what information should be displayed in which regions.
The most difficult change will likely be creating the regions for featured content. We will need to ensure that content can be created and temporarily featured on the home page. This may require new content types (News, Events) and changes to existing content types (Projects). Each of these regions should also contain a link to archived content of that content type. Therefore, new views will have to be created to display the archives.
Things should be easy to update by marketing and communications staff.
The content in the left sidebar should be blocks. These can vary in height depending on if they contain images, etc.
In general we are less worried about width/heights of specific regions, and more concerned with displaying the content effectively. Also disregard the colors of the regions, this is just a visual guide for developers.
See attached image.
| Comment | File | Size | Author |
|---|---|---|---|
| #21 | 1555102.diff | 2.27 KB | twardnw |
| #16 | homepage_center.txt | 2.28 KB | sheldonkreger |
| #13 | homepageUpdate.diff | 1.91 KB | sheldonkreger |
| da_homepage_wireframe5.png | 71.57 KB | sheldonkreger |
Comments
Comment #1
sheldonkreger commentedExploring ideas for implementing featured content on the home page:
1. Create block regions within content region using "Insert Block" module: http://drupal.org/project/insert_block
Good:
a) Editors will use blocks to make all home page modifications (other than text content), since the sidebar is already set up using blocks.
b) Insert Block module http://drupal.org/project/insert_block is in dev status, but appears to be stable in both 6 and 7.
Bad:
a) Block regions will have to be manually updated when new content is posted (editors can't just simply click "promote to front page" when they publish).
2. Create a page--front.tpl.php file.
Good:
a) Endless opportunity for customization.
Bad:
a) Additional code to maintain.
b) All changes requested by editors would have to be handled by web team. (Tyler suggested here may be a way to dodge this by adding pulling a view within each block).
3. Use Panels
Good:
a) It would be easy.
Bad:
a) Panels adds overhead (?)
I'm open to any thoughts on which way would be best.
Comment #2
sheldonkreger commentedComment #3
twardnw commentedSummary of a quick meeting Sheldon and I just had about the front page redesign.
The top 2 portions of the page will be the content of a page.
We will then use a node template to add 3 blocks from a view underneath the page content.
A 'front page block' taxonomy will be used to display a page on in one of those blocks.
We will add a 'front page image' field to the page content type, which will be displayed in the block if it exists (either using an image cache/style, or by constraining the uploaded size).
Comment #4
jredding commentedIdeally a.d.o would follow closely along d.o in terms of the modules used, this way when d.o upgrades to D7/D8/D9/etc. a.d.o can follow along without much additional work. Have the modules or methods currently in use on d.o been reviewed for suitability?
Can we build the a.d.o front page using the same method of d.o or d.o/start?
Comment #5
drummLet's keep the home page as a simple node for the image and text. There is a block region under the content. Drupal Books on http://drupal.org/documentation is an example of it being used.
Make a block which calls
drupalorg_crosssite_grid_elements(array({project}, {event}, {news}))to lay out the content on our grid. Replace{…}with integers summing up to 8.Get the content for each view with something like
And place it in the array from
drupalorg_crosssite_grid_elements(). Then calldrupal_render()on it and put it in the block content.Comment #6
sheldonkreger commentedI have set up a custom block.tpl.php file to display content in the appropriate homepage block region. But, I am having problems with drupal_render().
The code successfully executes drupalorg_crosssite_grid_elements(), but throws the following error message when I try drupal_render() on the array.
"Fatal error: Unsupported operand types in /var/www/dev/newsite-association.redesign.devdrupal.org/htdocs/includes/common.inc on line 2984"
Everything works until the last line.
The line of code the error message refers to lives here:
http://api.drupal.org/api/drupal/includes%21common.inc/function/drupal_r...
Here is the line:
My initial thought was that $content is not an array, like drupal_render() expects. But, using DSM shows that $content is indeed an array. Can anybody think of any other reasons why this might be happening?
Comment #7
twardnw commentedtry #sorted instead of $sorted
Comment #8
sheldonkreger commentedThat did it, thanks!
Comment #9
sheldonkreger commentedI created three views which display in each portion of the block region, respectively. Editors will use a taxonomy to display any page, book, or blog within any region of this home page block. The views pull the first 200 characters and the title of each piece of content. If multiple nodes are classified to be placed in the block (through the taxonomy), then views prefers the newest content.
Everything is working now. More testing tomorrow.
Comment #10
twardnw commentedMake sure the views use the option to pull the trimmed value *or* the summary, that way contributors can choose to display different text on the home page than just the trimmed text of the body.
Comment #11
sheldonkreger commentedI changed the formatting of the titles to be h3, and added support for displaying images in the columns. It looks like this is ready to go live. I'm going to gather the text and image to be used in the content region from marketing/comm staff.
Comment #12
sheldonkreger commentedDev site is working 100% and we are ready to test on staging.
The new region which displays the 3 columns beneath the homepage content is created through a file called block-block-36.tpl.php. this block needs to be displayed in the "content" region. When the new block is created on the live site, the file name will have to be changed to accurately represent the block ID number.
There are two rows with three columns, created through drupalorg_crosssite_grid_elements(). The top row creates titles which should remain static. Each column in the second row pulls data from a different source to display its content.
1. Create a block called "Homepage Block" and display it in the Content region. Configure to display only on
<front>.Do not define any content within this block. But, you will need to use the block ID number in the name of the block-block-x.tpl.php file.2. The leftmost column pulls data from a block called "Featured Project Region." Create a new block with this title and replace the ID number in the function call on line 10 to match.
3. Copy/paste this code into the new "Featured Project Region" block.
4. The rightmost column pulls data from a block called "Events List." Create a new block with this title and replace the ID number in the function call on line 13 to match.
5. Copy/paste this code into the new "Events List" block.
6. The center column pulls data from a view called "homepage_center". Create a new view with this title and no changes should be necessary to the code.
7. The new view "homepage_center" will need some configuration:
Basic Settings
Style: HTML list
Items to Display: 5
Fields:
Node: Title
Sort Criteria:
Node: Post Date desc (descending order to display newest news items first)
Filters:
Node: Promoted to Front Page yes
Node: Published yes
8. All other changes to the homepage (image, new text) can be done by editing the node manually.
9. Finally, upload the attached file into the Bluecheese theme folder. Rename the file to "block-block-x.tpl.php" where x is the appropriate block ID number (see step 1).
Comment #13
sheldonkreger commentedComment #14
twardnw commentedCan you export the code of the view and attach it as a file please?
Comment #15
webchickIf you, like me, are wondering where you can see this groovy home page in action, it's at http://newsite-association.redesign.devdrupal.org/ :)
Comment #16
sheldonkreger commentedHere's the code from view -> export.
Comment #17
drummThe new block should be implemented in
drupalorg_association_block()instead of being a custom template.Comment #18
jredding commented@drumm Instead of implementing code within a module can we utilize page-front.tpl.php and add custom regions?
Comment #19
drummSince page.tpl.php has a lot of stuff in D6, the full HTML shell of the page, we avoid duplicating it to mak maintenance easier. And Bluecheese is already branched for D7, so any changes there have to be done again in D7.
The code in #13 is a great start, it just needs to be moved within
drupalorg_association_block(). I'd also like to see some code cleanup, a);needs indentation corrected. More use of Drupal's APIs would be good. And less single-use variables would be good; no need to keep a copy of something in memory if it is only used once.For example
becomes
Comment #20
drummYou don't have to take this suggestion, I just noticed it. It is good to have link text match the destination, it helps navigation be predictable. "Events" should link to a page titled "Events," or change the link text to "DrupalCon."
Comment #21
twardnw commenteddrumm: please review attached code (or see at /var/www/dev/newsite-association.redesign.devdrupal.org/htdocs/sites/all/modules/association_drupalorg/association_drupalorg.module )
Comment #22
drummI went ahead and committed this, and then the cleanups, since it would be tedious to go over them in the issue queue. Please take look at http://drupalcode.org/project/association_drupalorg.git/commitdiff/a455c... to see the cleanups.
This is ready for testing on staging and, if staging looks okay, deployment.
Comment #23
twardnw commentedHrm, after merging that into staging, I am getting a 500 on /admin
Comment #24
senpai commentedThe a.d.o homepage error 500 on the staging server is being caused by #1473596: Update API version so I'm postponing this issue until we can fix that module's Google API error.
Comment #25
jredding commented@senpai although I don't understand how a Google API error should prevent a hook_block implementation on the frontpage considering that the frontpage of a.d.o does not have any ads on it (or methods of using the Google API).
With that said #1473596 is now considered critical and needs to be moved to the top of the priority list to be completed as soon as possible.
Comment #26
drummThe root cause of the WSOD on /admin is the new staging server not properly having SOAP installed. /admin runs status checks from /admin/reports/status, including google_dfp_api checking that it can connect. The module doesn't handle not having SOAP well, #1601172: Better handle missing SOAP library.
As part of fixing that up, I deployed this and the new block is showing on the home page.
Comment #27
drummSince we do e-commerce on the site, it is all https. But this introduces a Druplicon image not served with https, which browsers warn about.
Comment #28
tvn commentedNews and Events blocks could use some space added between their items to make it more readable, especially News one.
(Also link to Sao Paulo was broken, I fixed it in the events block).
Comment #29
sheldonkreger commentedThe new ADO homepage is live and approved by marketing staff. This phase of the project is considered finished by our project manager.
However, marketing staff is now interested in adding Facebook and Twitter buttions, which should be easy to set up in the right sidebar block region, or maybe in the footer. I directed them to jredding to schedule developer time. Should we start a new issue queue or leave this one open?
Comment #30
jredding commentedStart a new issue and mark this one closed.
Comment #31
sheldonkreger commentedComment #32
webchickGreat job, sheldon!
Comment #34
tvn commented