I’m not sure if this is a new-feature request/idea or an how-to question
... but being able to display a thumbnail togheter with the summary of a post would be great;
I believe the solution is in those
[+documentobject+] and [+tvnameoftv+] placeholders that I did not care to understand nor test yet! ...am I right?!
Yes, you are correct.
You simply need to create a new image TV, associate it with your document, and then add <img href="[+tvyourtvname+]" /> in your Ditto template.
Ok, got it working with the TV ( ’<img src=[+tvnameoftv+]’ alt="whatever" />
I did another try with [+documentobject+] which failed.
I designated one of the images in the article body with a CSS id: [tt]<img src="url/path" id="thumb">[/tt], then, in the Ditto template chunk, I tried using [tt][+thumb+][/tt] but I get no output from it, nor with the ID on the img as above nor by ID-ing a nesting DIV.
This DOM-like approach (pretty similar to the getElemntbyID() function) would be very general and useful with sub-divs, <p>s, anything in the article body; but probably [+documentobject+] just refers to ModX IDs and not to DOM elements... in this case I can’t quite figure out situations/examples where to use it ?!
Document object is the MODx Document Object ex: pagetitle, description, content, etc., not the DOM.
ok thanks for the clarification!
... support for DOM elements would be very useful though and maybe easier for Modx newbies -keep it in your notes for future realeases!
Since I am at it with (unasked) suggestions that may_bring_new_ideas_to_the_community_and_keep_the_code_base_tight (?)
I find a similar ’TV proliferation issue’ with the TAGS implementation; could it all be done by referencing the keywords defined in the modx manager?!?
Ciao!
Use one of the thumbnail generating snippets contained in the forums.
...Or, you might also be able to set the image size through "height" and "width" in the image tag or the CSS, I believe... Am I wrong?