Could you provide an example where the current page would be listed? Additionally, "omit the title link and only output the title itself" this can easily be done via a tpl
Please file a feature request so that the next release of Ditto will have the ability to identify the current document. Secondly, that is exactly what &tpl chunks are for. You only need to create one and include it in the call.
Ok, right now there are multiple tpl vars--- one for the first, last, alternating rows, and a general tpl (used if others are not set). You can specify one (tpl) or all to get the effect of customizing the posts HTML structure based on position. I am saying that I would add one more for the current document so that you could change the HTML structure for that particular post.
The additional tpl would indeed be a helpful addition. Whilst on the train home I was thinking about your previous comment and realised I needed to take a closer look at the code and situation so the below scenario is to help clarify things in my mind a bit more.
Scenario:
>> Ditto is used to output a list of pages within doc.id22 either as a sidebar block or as a blog entry/ childsibling list
>> User loads doc.id33 which is a child of doc.id22 and the list of children.doc.id22 is still shown.
>> Item 4 on the list is doc.id33 which is the current page so it should either be displayed differently via a new tpl or through the snippet which appends a custom class to the title link (that being the link using the name of the page and not the read more link)
Both approaches have their merits: a new tpl gives the site admin some flexibility in terms of formating the output but what if he/she doesn’t need the flexibility or isn’t comfortable with editing tpl chunks when all they want to do is highlight the current item on the list.
Personally I think it would be terrific if both solutions could be implemented, it gives the user a quick and easy css class to modify the title link and gives a power user the tools they need to further customise the output.
Having looked at the default tpl structure in the language file I think I’m following your idea a little bit closer and it would most likely be easier for you to implement.
What you think?
Has the ditto snippet been updated to include the use os index.php?q=
would be useful for those using ?q= or better yet work both ways for those using page.html too
Quote from: bugsmi0 at Jun 12, 2006, 11:48 AM
Has the ditto snippet been updated to include the use os index.php?q=
would be useful for those using ?q= or better yet work both ways for those using page.html too
I’m sure that Ditto uses makeUrl function from MODx API to build links, so both/all url configurations are supported.
"He can have a lollipop any time he wants to. That's what it means to be a programmer."