We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 31876
    • 33 Posts
    Hello guys,

    i’m a french designer trying to make my first website ("relatively" complex for me) with modx Revolution (great tool for designers)
    First, sorry for this bad english, I will try to explain my problems one by one :

    This is the first one :

    How is it possible (maybe with TinyMce?) to do some templating for the page [content] like that :

    http://dl.dropbox.com/u/7944572/test%20web%20w2/articlev2.html

    it’s all about the "white-zone" :
    I would like to permit site users to create "modular 2 columns" articles in the content of the page :

    1) left text column + image on the right
    2) one big image
    3) left image + right text column

    (any combination, any order, ex I choose 3, 2, 1, 2, 1.... to make my article)


    Any ideas?
    Thanks!

      • 4172
      • 5,888 Posts
      you can try, if multiItemsGridTV works for you.
      see screenshot.

      do it as here: https://github.com/Bruno17/multiItemsGridTV/wiki
      forum-thread see my signature.

      create additional dropdown-TV:
      name: itemtype
      input-type: dropdown
      input-option-values: text left - image right==itemtype1||image left - text right==itemtype2||big image==itemtype3

      to get the dropdown into your form-window, alter the property ’formtabs’ of the TV ’multiItemsGrid’ to:
      [{"caption":"Info", "fields": [{"field":"title","caption":"Title"}, {"field":"description","caption":"Description","inputTV":"richtext"}]  }, {"caption":"Image", "fields": [{"field":"image","caption":"Image","inputTV":"image"},{"field":"itemtype","caption":"Type","inputTV":"itemtype"}] }]


      create a chunk ’tvitems’ with content:

      [[+itemtype:is=`itemtype1`:then=`
      <div class="article-bloc-text-image">
      <div class="article-text-g">[[+description]]</div>
      <div class="article-bloc-image-r">
      <img src="[[+image]]"> 
      </div>
      <div class="clearr"></div>
      </div>
      `]]
      [[+itemtype:is=`itemtype2`:then=`
      <div class="article-bloc-image-text">
      <div class="article-bloc-image-l">
      <img src="[[+image]]"> 
      </div>
      <div class="article-text-d">[[+description]]</div>
      <div class="clearr"> </div>
      </div>
      `]]
      [[+itemtype:is=`itemtype3`:then=`
      <div class="article-bloc-image-854"> 
      <img src="[[+image]]">
      </div>
      `]]
      

      you can also (better) use the if-snippet instaed of output-filter-syntax.


      create a snippet ’getImageList’ with that code: https://github.com/Bruno17/multiItemsTv/blob/master/snippet.getImagelist.php

      and put a snippetcall into your template or resource-content:

      [[!getImageList? &tvname=`multiItemsGrid`&tpl=`tvitems`]]


      Or create three different chunks itemtype1,itemtype2,itemtype3 and use this snippet-call:

      [[!getImageList? &tvname=`multiitemsgrid`&tpl=`@CODE:[[$[[+itemtype]]]]`]]




        -------------------------------

        you can buy me a beer, if you like MIGX

        http://webcmsolutions.de/migx.html

        Thanks!
        • 31876
        • 33 Posts
        Wow.. thank you Bruno17, I appreciate your help.
        I’m not sure I’ve all understood for the moment tongue, but I’ll try it now, and give you feedback.

        cheers
          • 31876
          • 33 Posts
          I tried and it works, thank you Bruno.

          The problem for me now is not "technical" (it works fine), but "ergonomic", I’m not really sure it would be easy to manage for users, so I will try to adapt a little bit your solution if I can,

          the problem for me is that users needs to visualise the page the same time they design it (yes I know it’s HTML but..), not the final result but at least the schematic, maybe in the manager forms a richtext editor to the left and a preview of the image on the right and so on...


          in the grid we can’t see that, we have to imagine the result, so we can publish, tweak it, republish... but for my users it’s not really easy, I am afraid they will not use it (they use Indesign to make pages, so now they are lazy boys sad)

          your idea is good, maybe if I can make a more "graphical solution"..

          Like I said I will try it..

          Thank you again.
            • 4172
            • 5,888 Posts
            Wouldn’t be that difficult to add a preview-tab to the form-window, which calls a modx-resource with rendered output of that item.
            Or make the grid with only one column and create a renderer for that column, which shows the rendered output in the column-cells.
              -------------------------------

              you can buy me a beer, if you like MIGX

              http://webcmsolutions.de/migx.html

              Thanks!
              • 21838
              • 284 Posts
              Maybe it makes more sense to implement one of the frontend editors?
                MODX Free Template Base: MODX-Boilerplate | my blog (lots of MODX stuff) | my gitHub (translations) | MODX User Groups Germany (Facebook)
                • 31876
                • 33 Posts
                Well...

                I have not enough understanding of modx to decide what to do now laugh
                I think I have to investigate more with modx.. anyway I will do it.

                Bruno, you said to make the grid with only one column and create a renderer for that column... can you precise a little bit? Is there any documentation about that?

                smooth-graphics, thank you for your advice, you speak about modx frontend editors, where can I found there?





                  • 21838
                  • 284 Posts
                  Quote from: w2 at Dec 21, 2010, 11:34 AM

                  Bruno, you said to make the grid with only one column and create a renderer for that column... can you precise a little bit? Is there any documentation about that?
                  Fairly, its a bit unhandy. You have to copy the files into your running modx installation.
                  Think he delivers a manual in package but not sure. More information is in the forum here (other threads, please search for)
                  Quote from: w2 at Dec 21, 2010, 11:34 AM

                  smooth-graphics, thank you for your advice, you speak about modx frontend editors, where can I found there?
                  in the extras section on modxcms.com
                    MODX Free Template Base: MODX-Boilerplate | my blog (lots of MODX stuff) | my gitHub (translations) | MODX User Groups Germany (Facebook)
                    • 31876
                    • 33 Posts
                    I found another method here (but for evolution, need a snippet which doesn’t exist for revo) :

                    http://wiki.modxcms.com/index.php/Multiple_content_areas

                    well.. not more "wysiwyg" for users but...

                    Second method (maybe) : using TinyMce (which says it’s wysiwig) with custom styles, or a plugin.

                    Thank you for your help, I keep trying.