Skip to content
This repository has been archived by the owner on Oct 8, 2021. It is now read-only.

Listview: nested content using data-role="subpage" #512

Closed

Conversation

medovob
Copy link
Contributor

@medovob medovob commented Nov 18, 2010

A few tweaks to the current nested list implementation allows for nested content of any type.

The markup would look something like this:

<ul data-role="listview">
     <li>
          <h2 data-role="subpagetitle">Subpage Title</h2>
          <p>Brief description</p>
          <div data-role="subpage">
                <p>Long Description</p>
          </div>
     </li>

     ...etc

 </ul>

…nt of any type using data-role="subpage" attribute

Also includes data-role="subpagetitle" that can specify the title content and caters for more complex parent list layouts
@scottjehl
Copy link

Interesting idea. Can you post a link to a working demo for this please?

It seems like linking to an internal page might be easier and structurally better than placing page content inside a UL structure. What do you think?

<div data-role="page">
<ul data-role="listview">
    <li><a href="#foo">foo</a></li>
    <li><a href="#bar">bar</a></li>
</ul>
</div><!-- /page -->


<div data-role="page" id="foo">
...
</div><!-- /page -->


<div data-role="page" id="bar">
...
</div><!-- /page -->

@taliesins
Copy link

+1 vote from me.

@Violinist
Copy link

+1 vote from me.
It will be definetly useful for me and will increase code readability.

@ghost
Copy link

ghost commented Jan 28, 2011

In alpha 2, when I create a thumbnail list item and then add sub list items under that, it is giving me an error. This looks similar to what you are discussing. This is the code I used..

<li>
   <img src='resources/images/g.jpg' />
   <h3><a href='#'>Test</a></h3>
   <p>Governor</p>
   <ul>
     <li>Test</li>
   </ul>
</li>

Even this is giving an error.

<li>
   <span>test</span>
   <ul>
     <li>Test</li>
   </ul>
</li>

@johnbender
Copy link
Contributor

medovob,

Thanks for taking the time to contribute, judging by the discussion this is certainly something that we'll want to address post beta/release. For now I'm going to move this to the feature request wiki page.

@medovob
Copy link
Contributor Author

medovob commented Feb 12, 2011

Ok - thanks for considering this.

If anyone is interested, I've put a script together that provides this functionality by creating the subpages using the pagebeforecreate event

https://gist.github.com/823744

Any comments/feedback welcome

This pull request was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants