I’ve tried searching but nothing close shows up.
Each member has a page with 11 details about themselves.
I want their Name, Business Name, and URL (just these 3) to go to another page and populate
that page decending in alpabetical order. With their Name linking back to the page with their 11 entires on and the URL to link out to the website. Can I put commands/code in thr Resource Content area to do this? If so an idea of how and what to apply would be greatly appreciated.
Thank you,
bauhaus9
-
☆ A M B ☆
- 24,524 Posts
The best way to do that would be to make those items TVs, then use a custom Ditto tpl to display those TVs.
-
☆ A M B ☆
- 104 Posts
Lets say all of your members are under a page with id 42. To show all of them you’d first make a chunk that looked something like this:
<dl class="member">
<dt>Name</dt><dd>[+name+]</dd>
<dt>Business Name</dt><dd>[+business-name+]</dd>
...
</dl>
Then in the template or page you’d like them all to show up, you’d put your Ditto call which would look something like this:
[[Ditto?&startID=`42`&tpl=`your-new-chunk`]]
Obviously your chunk might look a bit different depending on how you’d format your members, but that should get you started.
-
☆ A M B ☆
- 24,524 Posts
If you have a TV named "membersname", then Ditto will automatically put its value in the [+membersname+] placeholder.
The trick to Ditto (and any other snippet) tpls is to actually write the HTML for exactly what you want each item to look like. Then replace the content from the resource with the appropriate placeholders. The tpl gets applied to each resource, with its values for the placeholder’s name inserted where the placeholder is.
Thus [+pagetitle+] will be replaced with each resource’s page title in turn; likewise any TVs you want to use.
Usually in the case of dealing with people, whether it’s members or employees or anything else like that, the page title will be the person’s name, so in the Ditto tpl I would use [+pagetitle+] where I want the person’s name to appear. The only time I would use a TV would be if the resource is actually about something else, for example a song, then I would have a TV for the performer’s name.
Thank you all so much for the help.
I have figured out how to add TV’s, use them with a CHUNK and add the CHUNK’s listing with Ditto to go into a resource page. With each of my listings on the resource page linking back to the members full information page. Viva MODx!!!
bauhaus9
Now to tackle eForm setup....
I’m sure you will be hearing from me soon.
Have a great Friday!!!