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

    is it normal that Reflect generates URL parameters as follows: &reflect_xxx_year=2007&reflect_xxx_month=7???

    I’m asking because I’ve trouble with my current configuration and with "normal" parameters like &year=2007&month=7 everything works fine.

    But I’ll try to explain what I’m doing. I want to manage a blog. Therefore I’ve a container document (ID 1) and its content looks like:

    [!Ditto? &parents=`1` &summarize=`10` &removeChunk=`newlukai.Comments` &tpl=`newlukai.Blog` &paginate=`1`
    &extenders=`dateFilter` &paginateAlwaysShowLinks=`1` &language=`german` &dateFormat=`%d.%m.%Y` &tagData=`documentTags`
    &tagDelimiter=` `!]
    [+dittoBlog_previous+] | [+dittoBlog_pages+] | [+dittoBlog_next+]
    


    This works fine. The documents are listed as expected and can be displayed.
    Additionally I’ve a TV "Sidebar" and its content is displayed in a further div, like a sidebar ...

    This TV contains following:
    <h1>Tags</h1>[!TvTagCloud? &parent=`1` &landing=`1` &tvTags=`documentTags` &showCount=`0` &tagDelim=` `
    &sort=`asc` &caseSensitive=`1` &tooltip=`Dokumente mit dem Tag '[+tag+]' anzeigen ([+count+] gefunden)`!]
    <br /><br />
    [!Reflect? &groupByYears=`1` &showItems=`0` &tplMonth=`newlukai.ReflectMonthTpl` &tplContainer=`newlukai.ReflectContainer`
    &targetID=`1` &getDocuments=`1` &dittoSnippetParameters=`parents:1`!]
    <h1>HotStuff</h1>[!Ditto? &startID=`6` &summarize=`10` &tpl=`newlukai.HotStuff` &paginate=`0` &language=`german`
    &tplLast=`newlukai.HotStuffLast` &id=`dittoHotStuff`!]


    It should display a TagCloud (this works) and an archive of blog posts. The third element is a second Ditto call to display special elements.

    With this configuration there is one problem: Reflect generates links with this random parameters and any such link just displays the whole content again instead of filtering it by date.

    In another configuration I’ve set the Ditto and Reflect parameter "id" to the same value. Then it worked. By coding an additional parameter for TvTagCloud even this worked. But as soon as I displayed a blog post (which has the "Sidebar" value @INHERIT, that means a tag cloud, an archive and the additional Ditto call), Reflect displayed "The Ditto object is invalid. Please check it.".

    So I don’t know how to realize my special case of a blog, but I would appreciate any help. I think it could be easily done, if I could just replace those randomized URL parameters by normal ones.

    Thanks in advance
    Newlukai
      • 18397
      • 3,250 Posts
      Reflect will generate parameters like:
      &reflect_xxx_year=2007&reflect_xxx_month=7
      

      when no &id is passed. This is to ensure it does not accidentally filter another Ditto call. To achieve what you want you will need to use &id for all three snippets.

      First, I would suggest upgrading to Ditto 2.1b3 as it offers a much improved Reflect version. It is important to note that the template structure has slightly changed between the two versions. To see the changes refer to default.templates.php. Then, ensure the Reflect call still has &getDocuments=`1` in it. That should force Ditto to ignore the object provided by the Ditto id and retrieve the documents on its own.
        • 34162
        • 1 Posts
        Quote from: Mark at Jan 06, 2008, 04:19 PM

        To achieve what you want you will need to use &id for all three snippets.

        It’s mysterious: it works. As I mentioned before, I already tried this and I got a "ditto object invalid" error. I hope it works from now on and I’ll never have to ask again wink

        Thanks