The default home page is going to come baked in with some mumbo-jumbo marketing text. Ezra would like this to be configurable upon installation, so that people don't have to undo any defaults.

The way we thought to implement this was just a blob of HTML that's stuck into a "custom content" pane.

This is too above my head atm, but filing an issue to track it.

Comments

ezra-g’s picture

Priority:Major» Critical

I think the technical components here are:

- A block that contains the text which is set in 2 variables (one for title, one for content).
- An install task to configure these values.

Marking as "Critical" to track this as as one of the highest priority features.

gnuget’s picture

Assigned:Unassigned» gnuget
Status:Active» Needs work
StatusFileSize
new1.71 KB

This is my initial work on this issue (i'm attaching a patch)

I still needs to do some research about how set the value of the 2 variables at the anonymous frontpage.

And a little more work in the code.

(I'm going to assign this issue to me, i will continue working on it)

any thought about the patch would be awesome

ezra-g’s picture

@gnuget - Thanks for the patch! I think you're headed in the right direction here.

I think you want to implement hook_block_info():
http://api.drupal.org/api/drupal/modules%21block%21block.api.php/functio...

and hook_block_view():

http://api.drupal.org/api/drupal/modules%21block%21block.api.php/functio...

in the commons_site_homepage module and define a block where the subject and body use those variables. The final step would be to add that block to the default Panels page for the anonymous homepage.

Feel free to find me in #drupal-commons to discuss further!

gnuget’s picture

Oks.

I think to did it!

I'm re-attach the same patch from the #2 and i add another patch for commons_site_homepage module.

Some thoughts:

- The generated markup for the new block is slightly different from the previous welcome message, so the css needs an adjustment, but i don't sure if this would be part of this issue or this should be a separate one.

- I don't sure if the ballon image should be part of the message, right now i put it in the same place where has before, (before the content) but i don't sure if this is ok or i should remove it.

- The balloon image is a remote file from skitch i think to this image should exists locally.

Thanks for the hints @ezra-g, helped me a lot

ezra-g’s picture

Status:Needs review» Fixed

Thanks, gnuget! That's exactly the kind of change I described.

However, as I looked at this task more closely, I realized that we want to preserve the ability for site admins to edit the homepage text later, and that this is more easily accomplished by using custom Panels content.

So, I used your patch that adds the installer task and settings, added some descriptive language, added a preview screenshot of the homepage, changed calls from t() to st() inside the installer, and made the default homepage use variable_get() to pull the saved values from the setting form you created.

Thanks for your work here! I credited you in the commit messages:

http://drupalcode.org/project/commons_site_homepage.git/blobdiff/bbf3753...

http://drupalcode.org/project/commons.git/commitdiff/2fa611a?hp=7063f7b1...

Status:Fixed» Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.