Github user eranwitkon commented on the pull request:

    https://github.com/apache/incubator-zeppelin/pull/191#issuecomment-130810948
  
    Where are we going to document this option? (as it is a user option and not 
a developer option?
    I would like to propose adding this part to the documentation:
    
    ## Adding Notebooks list to your custom Homepage
    If you want to have your custom homepage but still be able to display the 
list of notebooks on your home page all you need to do is use our %angular 
support.
    Add the following code to a paragraph in you home page and run it... walla! 
you have your notebooks list.
    ```javascript
    println("""%angular 
            <div class="col-md-4" ng-controller="HomeCtrl as home">
            <h4>Notebooks</h4>
    
            <div>
               <h5><a href="" data-toggle="modal" data-target="#noteNameModal" 
style="text-decoration: none;">
                  <i style="font-size: 15px;" class="icon-notebook"></i> Create 
new note</a></h5>
              <ul style="list-style-type: none;">
                <li ng-repeat="note in home.notes.list track by $index"><i 
style="font-size: 10px;" class="icon-doc"></i>
                  <a style="text-decoration: none;" 
href="#/notebook/{{note.id}}">{{note.name || 'Note ' + note.id}}</a>
                </li>
              </ul>
            </div>
          </div>
          """)
    ```
    Once you run it you will see output similar to this one:
    
![selection_012](https://cloud.githubusercontent.com/assets/2227083/9259047/77dedd32-4207-11e5-9013-44d53565aca0.png)
    
    And in report mode
    
![selection_013](https://cloud.githubusercontent.com/assets/2227083/9259094/9ed419ca-4207-11e5-935a-aae335f009c1.png)
    
    Main trick here relays in linking the ```<div>``` to the controller:
    ```javascript
    <div class="col-md-4" ng-controller="HomeCtrl as home">
    ```
    once we have ```home``` as our controller variable in our ```<div></div>``` 
we can use ```home.notes.list``` to get access to the notebook list.



---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to