Sep 08, 2008, 10:37 AM *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
modxcms.com web
  MODxCMS.com   Forums   Help Login Register  
Pages: [1] 2   Go Down
  Print  
Author Topic: Example of Reflect to do a Ditto Post Archive  (Read 4546 times)
0 Members and 1 Guest are viewing this topic.
johnvb
Jr. Member
*
Posts: 48


WWW
« on: Apr 15, 2007, 02:25 AM »

Can anyone point me at some example code for setting up Reflect to do a Ditto Month by Month archive please? Couldn't work it out from the Ditto documentation, I just get an error "The Ditto object is invalid. Please check it."

Thanks

John
Logged
Mark
Moderator
*
Posts: 3,247


Ditto Developer


WWW
« Reply #1 on: Apr 15, 2007, 02:44 AM »

1. Make sure you are using the latest version of Reflect bundled with Ditto 2.0.2
2. Copy the following call [[Reflect?config=`wordpress` &targetID=`2` &getDocuments=`1` &dittoSnippetParameters=`startID:2`]]
3. Change the 2 to the container holding your blog entries and has &extenders=`dateFilter` in its call.
« Last Edit: Apr 15, 2007, 02:38 PM by Mark » Logged

johnvb
Jr. Member
*
Posts: 48


WWW
« Reply #2 on: Apr 15, 2007, 04:00 AM »

Thanks again Mark. I now have this in a test page:
[[Reflect?config=`wordpress` &targetID=`681` &dittoSnippetParameters=`startID:148`]]
There are blog posts within folder 148, and page 681 contains a ditto call:
[!Ditto?startID=`148` &tpl=`BlogEntry` &extenders=`dateFilter`!]

There are still a couple of problems:
1) The Ditto call always displays the most recent posts (as if the extender isn't working)
2) The month archive list is in the wrong order when the months are for previous years:
    * January 2007
    * February 2007
    * March 2007
    * April 2007
    * June 2006
    * July 2006
    * August 2006
    * September 2006
    * October 2006
    * November 2006
    * December 2006

Any ideas?
Logged
johnvb
Jr. Member
*
Posts: 48


WWW
« Reply #3 on: Apr 15, 2007, 07:58 AM »

Not sure about the date ordering problem yet, but the other problem is solved by including &getDocuments=`1` in the reflect call.
Logged
Mark
Moderator
*
Posts: 3,247


Ditto Developer


WWW
« Reply #4 on: Apr 15, 2007, 02:39 PM »

Try upgrading to the latest development edition for problem number 2.
Logged

johnvb
Jr. Member
*
Posts: 48


WWW
« Reply #5 on: Apr 15, 2007, 03:01 PM »

Actually, I've just worked it out. I had to set &monthSortDir=`DESC` to fix it. For some reason the default for years is DESC but months is ASC so you get the odd sort order.

Thanks again for your help,

John
Logged
Mark
Moderator
*
Posts: 3,247


Ditto Developer


WWW
« Reply #6 on: Apr 15, 2007, 03:11 PM »

That was what I changed in the dev version, specifically in the "wordpress" config file. It normally sorts like that since it displays a list by year then by month.
Logged

DfX
Member
**
Posts: 81


« Reply #7 on: Jun 13, 2007, 03:34 PM »

Does Reflect only work in 0.96?

I cant get it to work, Im using 0.95.
Ive tried a dozen examples and I cant get it to work..its....driving.... me.. nuts...
 Shocked

TY
Logged
Mark
Moderator
*
Posts: 3,247


Ditto Developer


WWW
« Reply #8 on: Jun 13, 2007, 07:22 PM »

Reflect works fine in both 0.9.6 and 0.9.5. Remember, for Reflect to work you must have the version of Ditto it was bundled with installed. This should give you some examples: http://ditto.modxcms.com/tutorials/wordpress-style-archives.html
Logged

DfX
Member
**
Posts: 81


« Reply #9 on: Jun 13, 2007, 08:20 PM »

Ok , Thank you-
But Ive tried that and it does not work right for me Ive also tried this...
But it only results in One Month...


update

unbelievable it appears most of my misery has been caused by a slight misspelling...
now after adjusting some parameters im on the right track...

Thanks for your attention..
« Last Edit: Jun 13, 2007, 08:33 PM by DfX » Logged
DfX
Member
**
Posts: 81


« Reply #10 on: Jun 13, 2007, 08:46 PM »

BTW-
In the style for that wordpress style archive..if you want to get rid of the gaps in the li's dont forget to apply:
display:inline

to  the style
 .reflect_archive_list ul ul li

IE quirk.
that alone will get rid of spacing probs.
Again thank you...I cant believe something like a misspelling has put me on hold for as many hours as it has...
(note to self: check spelling first!)

Logged
sarah
Full Member
***
Posts: 164


« Reply #11 on: Nov 09, 2007, 12:19 AM »

Hi,

Is there any way to limit the results to just one month?

Thanks in advance,

Sarah
Logged
ddools
Jr. Member
*
Posts: 36


« Reply #12 on: May 09, 2008, 07:16 AM »

Hi sorry to bump this old post like this(but it does have relavence i think)...

based on the previous posts ive been trying to create something similar(ie a post archive)
so

page 107 is my blog page, and is also where i want to display the archive, and it is also the folder that all my blogs(pages) are being kept under

page107
     blog1
     blog2
     blog3

page124

so... page 107 contains the following code

Code:
[[Reflect?config=`wordpress` &targetID=`124` &dittoSnippetParameters=`startID:107`]]

and in another page(page 124) i have this code
Code:
[!Ditto?startID=`107` &tpl=`BlogEntry` &extenders=`dateFilter`!]


now when i load page 107 i can see my blogs and also th archive, but when i select the archive i am brought to a page

URL:    www.mydomain.com/124.html?reflect_708_month=5&reflect_708_year=2008&reflect_708_day=false&reflect_708_start=0

and a blank page....

andbody have any suggestions as to what im doing wrong?,,
cheers
Logged
tkfm
Sr. Member
****
Posts: 450


WWW
« Reply #13 on: May 09, 2008, 01:38 PM »

Try using &id parameter for both snippets(Ditto and Reflect).
Logged
fanta
Jr. Member
*
Posts: 13


« Reply #14 on: Jul 03, 2008, 09:04 AM »

Hi,

I cannot make this automate archive working... I did everything as described above,  I tried also to follow steps from here:
http://ditto.modxcms.com/tutorials/wordpress-style-archives.html,

I have still info: The Ditto object is invalid. Please check it.

I don't know if i am doing this right... I have page called Blog (2) where I have summary of my posts published. In this folder I keep all posts. I created new document called Archive (52) where I put this call:
Code:
<h2>[+wp_month+] [+wp_day+] [+wp_year+]</h2> [!Ditto? &id=`wp` &extenders=`dateFilter` &parents=`2`!]

In my template I put on a sidebar this call:
Code:
[!Reflect? config=`wordpress` &targetID=`52` &getDocuments=`1` &dittoSnippetParameters=`parents:2` &id=`wp`!]

It is not working, what I'm doing wrong? Do I have to specify somwhere this id=wp? do I have to specify something like: config=`wordpress`  ? I don't understand where these come from, I took them from teutorial.
also, do I have to create new documents for each month? or is it automaticly created? I'm lost.....
Thanks
« Last Edit: Jul 03, 2008, 09:15 AM by fanta » Logged
Pages: [1] 2   Go Up
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP

Copyright © 2005-2008 MODxCMS, All rights reserved. Contact Us
Styles by ziworks.com

Powered by SMF 1.1.4 | SMF © 2005, Simple Machines LLC

Valid XHTML 1.0! Valid CSS!