We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 20014
    • 200 Posts
    ok, had some problems with date formating, had stayed on ditto, but as bob suggested it’s time to move to everything supported by revo, ditto was acting funky so I went completely with getresources and getpage.

    so far I have tried to follow the get resources and get page documentation, all the styles have fallen in place, even noticed the dates are links, nice!

    but I am having a problem where I can’t get the intotext too work, the title, changing user to fullname changed the author name to the generic screen name and not my log in name, the read more and get page links have all taken well to my old evo install css, but no introtext, not either on the main container page or the summeray links (i.e. recent news and articles) on the home page.

    here is the call including get page on the main "blog/article "container:
    [[!getPage? &elementClass=`modSnippet` &showHidden=`1` &element=`getResources` &parents=`11` &limit=`3` &pageVarKey=`page` &includeTVs=`1` &includeContent=`1`&tpl=`getresmain`]]
    <div class="paging">
    <ul class="pageList">
      [[!+page.nav]]
    </ul>
    </div>


    and here is the template
    <div class="ditnewscontainer" id="ditnewscontainer">
    <div class="calender" id="calender">
                <div class="month" id="month">[[+publishedon:strtotime:date=`%b`]]</div>
                <div class="day" id="day">[[+publishedon:strtotime:date=`%d`]]</div>
                <div class="year" id="year">[[+publishedon:strtotime:date=`%Y`]]</div>
              </div>
    <div id="ditpost">
       <h2 class="head2"><a href="[[~[[+id]]]]" title="[[+pagetitle]]">[[+pagetitle]]</a></h2>
       <div class="ditto_info" >By <strong>[[+createdby:userinfo=`fullname`]]</strong>. </div>
     <p class="summary">[[+introtext]]</p>
      <span class="ditto_link" id="ditto_link"><a href="[[~[[+id]]]]">Read more</span>
    </div>
    </div>

    I kept my old ditto classes.

    In the summery section on the home page I placed this call in the template without get page:
    [[!getResources? &parents=`8` &limit=`1` &tpl=`dittonewsnew` &includeContent=`1` &showHidden=`1`]]

    and here is the template:
    <div id="outer1">
    <div id="container1">
    <div id="inner1">
    <div id="text1"><h3 class="frontnews"><a href="[[~[[+id]]]]" title="[[+pagetitle]]">[[+pagetitle]]</a></h3>
    <div id="newstextindent"><span class="ditto_documentInfo">By [[+createdby:userinfo=`fullname`]] [[+publishedon:strtotime:date=`%b`]] [[+publishedon:strtotime:date=`%d`]] [[+publishedon:strtotime:date=`%Y`]]</span>
    [[+introtext]]
    <span class="readmore"><a href="[[~[[+id]]]]">Read more</span>
    </div>
    </div>
      </div>
    </div>
    </div>


    lots of divs due to vertical and horizontal centering across all browser. also, I used show hidden in the call because they have no links in wayfinder, also if I can get intro text to work is there a &trunAt type of setting? the front end summery real estate is very limited.
      • 20014
      • 200 Posts
      anyone out there run into this problem? the getresources and get page more or less work, the title link, the dates, the author, readmore and page links all work, there just isn’t a summery of the posts with the [[+introtext]] call.

      ditto seems to break on reload of pages, even though it more or less worked in the front end summery the container page with the summery would sometimes only list one article and it wasn’t until I saved a new article would they all show up again, also the pagination links would disappear and if it’s deprecated then I guess I shouldn’t bother trouble shooting it. it’s no longer installed on my local installation only getresources and getpage.

      I now I have a tendancy of trying to solve something for an hour or two only to stumble across the answer seconds after posting and after taking a closer look at the docs (rtfl) but this one I can’t get going and I have been at it for eight hours straight. any ideas would be great.

      I think this is also affecting my rss config using getresources, I can see the rss page in FF but no title or links (I followed the tut as shown here by splitting red: http://modxcms.com/forums/index.php/topic,52541.0.html, in chrome it does show the a list of the following and safari can’t open the rss page:
      <item>
      		<title></title>
      		<link>http://localhost/new_revo/index.php?id=12</link> <-----there are actually several listed with the different resource ids here
      		<description><![CDATA[  ]]></description>
      		<pubDate></pubDate>
      		<guid isPermaLink="false">http://localhost/new_revo/index.php?id=12</guid>
      </item>


      perhaps since getresources is being used it may enlightened coders what’s going on and it could help?
        • 20014
        • 200 Posts
        please, I have set up the trees on all the languages of my sites, my articles are waiting, I have got the thing 90% ported to revo, I just can’t for the life of me find where I fugged the getresources call up, could it be I need to update mysql or apache (apache on localhost crashes when messing around in revo manager, but thats on firefox with firebug installed and running soooo....)? I am crying and tearing my hair out now, are you happy? laugh laugh just joking there, but I am becoming quite desperate, I could care less about the rss feed, I just need the introtext placeholder to do it’s thing, but I just don’t know what else I can do.
        Don’t leave me behind on evo while everyone else is having fun of revo, it’s not fair! laugh laugh
          • 28215
          • 4,149 Posts
          You’re saying everything works but the introtext field?
          Are you sure you have actual data in the introtext fields on those resources?
            shaun mccormick | bigcommerce mgr of software engineering, former modx co-architect | github | splittingred.com
            • 20014
            • 200 Posts
            oh geez, on evo I had learned to just ignore the (at the time called) Summary and use the snippet call to control how long and where to end the articles summary before the read more link...never once used it....didn’t even realize that that is precisely what getresources uses for the text in the summary...

            splittingred, I apologize for my many noob transgressions, I am now going to get myself another email address and create a new account out of pure embarrassment.
            I was thinking of I.D.ot123 for my username... laugh

            My head is definitely hunkered down on this one, I just thought the jump to revo to be more difficult than it is. I was looking at it in every angle except the most obvious. modx is pretty much surprising me at every turn. I have to admit, I almost expected revo to be like a major drupal update; the only difficulties I have had so far have been of my own making, not taking a closer look at the rtfm docs and opening my eyes to the little things in manager. embarrassed
              • 3749
              • 24,544 Posts
              You’re not the first or last person to stumble when moving to Revo. I think you’ll find it definitely pays off, though.

              You might consider changing the subject line to:

              Why aren’t my empty introtext fields showing up in getResources?

              (Just kidding) grin grin grin

                Did I help you? Buy me a beer
                Get my Book: MODX:The Official Guide
                MODX info for everyone: http://bobsguides.com/modx.html
                My MODX Extras
                Bob's Guides is now hosted at A2 MODX Hosting
                • 28215
                • 4,149 Posts
                No worries modxlearner123, it happens to all of us.

                You could also do this to prevent this:

                [[+introtext:default=`[[+content:ellipsis=`300`]]`]]
                

                This will use the introtext field, but if it’s empty, use the content field, and truncate it at 300 chars and add an ellipsis at the end.
                  shaun mccormick | bigcommerce mgr of software engineering, former modx co-architect | github | splittingred.com
                  • 20014
                  • 200 Posts
                  thanks guys, I really have to pay more attention, I have actually found myself just hitting these forums and bookmarking every howto technique I can find, my bookmark folder for this site has grown to around two hundred links so far, and I really need to start listening rather than panicking...sorry. I find myself doing crap that I had taken special care not to do when I first fired up a linux box and went to their forums.

                  But unlike most forums, the people here really do seem to be much more laid back and patient, for this I am very very grateful.

                  bobray, you’ve already gotten me out of a ton of jams and splittingred, I can’t thank you enough for the sweat you’ve put into this cms (that goes for you to bobray, your tuts are absolutely key and the code you’ve contributed) thanks for the that example too splittingred, it’s shining the light on the "new" logic of revo.

                  and I will be more careful on clarifying the subject of future problems I run into.



                    • 37210
                    • 131 Posts
                    Quote from: splittingred at Aug 17, 2010, 08:24 AM

                    No worries modxlearner123, it happens to all of us.

                    You could also do this to prevent this:

                    [[+introtext:default=`[[+content:ellipsis=`300`]]`]]
                    

                    This will use the introtext field, but if it’s empty, use the content field, and truncate it at 300 chars and add an ellipsis at the end.

                    I like, I like.

                    Exactly what I was looking for.
                      • 3749
                      • 24,544 Posts
                      Quote from: modxlearner123 at Aug 18, 2010, 06:13 PM

                      bobray, you’ve already gotten me out of a ton of jams and splittingred, I can’t thank you enough for the sweat you’ve put into this cms (that goes for you to bobray, your tuts are absolutely key and the code you’ve contributed) thanks for the that example too splittingred, it’s shining the light on the "new" logic of revo.
                      Thanks for the kinds words. It’s nice to be appreciated. wink
                        Did I help you? Buy me a beer
                        Get my Book: MODX:The Official Guide
                        MODX info for everyone: http://bobsguides.com/modx.html
                        My MODX Extras
                        Bob's Guides is now hosted at A2 MODX Hosting