We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 5699
    • 46 Posts
    computersolutions.cn Reply #1, 19 years, 9 months ago
    How does one do a mini view / full view using Ditto?

    eg I’m doing a shopping cart with Shopx (in theory)...


    Most carts have a small view, then a detailed view of an product.

    Right now I’m doing my "preview" like so

    <div>[!Ditto? &startID=`5`&tpl=`SummaryView` &showInMenuOnly=`1` &displayArchive=`0`  &trunc=`1` &summarize=`12` &multiLevel=1 & &paginate=`1` &paginateAlwaysShowLinks=`1`!]</div>
    
    <p><p><p>
    <div id="ditto_pages">[+previous+] [+pages+] [+next+]</div>


    SummaryView looks like this:

    <div class="prolist">
    <h3>[+title+]</h3>
    [+summary+]
    <br><br>
    <div id="ditto_pages"><a href="[~[+id+]~]">More...</a></div>
    </div>



    I’d like the preview view to work as is, except call a larger view with more details when I click more (and have the shopx snippet in the more details view).

    My initial attempt was to do this

    <div class="list_img"><img alt="Jackets" height="187" src="images/GAD%20-Down%20Jackets/32%20575%20256_s.jpg" width="140" border="0"/></div>
    <!-- splitter -->
    {{FullView}}


    And have fullview as a chunk with the shopx buy stuff inside.


    See www.polyardshanghai.com for what I’ve got so far.

    Anyone got some bones to toss my way or idea’s on how to do it, i’d appreciate it. I’ve taken a quick look at PHx, and that looks like a solution, but any other ideas would be welcome.

      • 21191
      • 236 Posts
      I’m kind of confused on what you are trying to do, but I did notice this .

      <p><p><p> ? no closing </p> ’s? d00d this isn’t myspace! Sorry I’m a w3c validating hawk.

      I did some conditional TV inclusion if thats what you mean?
        ~Shawn Himmelberger
        Check out my MODx Development and MODx Design Company - Himmelberger Design
        • 24495
        • 407 Posts
          • 5699
          • 46 Posts
          computersolutions.cn Reply #4, 19 years, 7 months ago
          Actually the solution was to make template variables for all the product fields, then make 2 chunks.

          Ditto generates the general page view, with the small chunk view showing thumbnail tv and product id tv.
          The product page itself has a chunk call which fills out the rest of the layout.

          Surprisingly easy to do in Modx. I just didn’t get how to use TV’s until now. This makes things a *lot* more powerful.