<![CDATA[ Display Resources Selected Through TV [URGENT] - MODX Community Forums]]> https://forums.modx.com/thread/?thread=70587 <![CDATA[Display Resources Selected Through TV [URGENT]]]> https://forums.modx.com/thread/70587/display-resources-selected-through-tv-urgent?page=2#dis-post-394868 http://rtfm.modx.com/pages/viewpage.action?pageId=34636241 (multi-select box for related pages), but the TV can't pull resources from several parents, only one; and it doesn't output the image TV, it only seems to spit out the pagetitle and nothing else. Any suggestions? I've actually posted this question a few times with no luck so i thought i'd try one more time.]]> pjldesign Sep 27, 2011, 03:10 AM https://forums.modx.com/thread/70587/display-resources-selected-through-tv-urgent?page=2#dis-post-394868 <![CDATA[Re: Display Resources Selected Through TV [URGENT]]]> https://forums.modx.com/thread/70587/display-resources-selected-through-tv-urgent#dis-post-409170 greengoatmedia Jan 25, 2012, 08:45 PM https://forums.modx.com/thread/70587/display-resources-selected-through-tv-urgent#dis-post-409170 <![CDATA[Re: Display Resources Selected Through TV [URGENT]]]> https://forums.modx.com/thread/70587/display-resources-selected-through-tv-urgent#dis-post-394927
chunk:

[[relatedPages? &input=`[[*isNewFilm]]` &tpl=`archive-image-tpl`]]
[[+archive-image]]


whew!]]>
pjldesign Sep 27, 2011, 01:25 PM https://forums.modx.com/thread/70587/display-resources-selected-through-tv-urgent#dis-post-394927
<![CDATA[Re: Display Resources Selected Through TV [URGENT]]]> https://forums.modx.com/thread/70587/display-resources-selected-through-tv-urgent#dis-post-394922
chunk:

[[relatedPages? &input=`[[*isNewFilm]]` &tpl=`archive-image-tpl`]]


relatedPages snippet:

<?php
if (empty($input)) { return 'This article is so unique, that we couldn\'t find anything related to it!'; }
$tpl = $modx->getOption('tpl',$scriptProperties,'relatedPagesTpl');
if ($modx->getChunk($tpl) == '') { return 'We found some related pages, but don\'t know how to present it.'; }
$ids = explode(',', $input);
$output = array();
foreach ($ids as $key => $value) {
  $resource = $modx->getObject('modResource',array(
    'published' => 1,
    'id' => $value));
if ($resource instanceof modResource) {
    $fields = $resource->toArray();
    $fields['archive-image'] = $resource->getTVValue('archive-image');
    $output[] = $modx->getChunk($tpl,$fields);
  }
}
return implode('',$output);


tpl archive-image-tpl:

<li class="archive-item">
<a href="[[~[[+id]]]]" rel="galerie">
<img data-href="[[+tv.archive-image]]" alt="[[+pagetitle]]" src="assets/webapps/jail/_img/fa_loading.gif" width="200" height="281" /></a>
<a href="[[~[[+id]]]]"><p><em>[[+pagetitle]]</em> ([[+tv.release-date]])</p></a>
</li>


archive-image and release-date aren't being processed

any help would be greatly appreciated, site has to go live shortly...]]>
pjldesign Sep 27, 2011, 11:29 AM https://forums.modx.com/thread/70587/display-resources-selected-through-tv-urgent#dis-post-394922
<![CDATA[Re: Display Resources Selected Through TV [URGENT]]]> https://forums.modx.com/thread/70587/display-resources-selected-through-tv-urgent#dis-post-394918 zaigham Sep 27, 2011, 11:21 AM https://forums.modx.com/thread/70587/display-resources-selected-through-tv-urgent#dis-post-394918 <![CDATA[Re: Display Resources Selected Through TV [URGENT]]]> https://forums.modx.com/thread/70587/display-resources-selected-through-tv-urgent#dis-post-394915 pjldesign Sep 27, 2011, 10:52 AM https://forums.modx.com/thread/70587/display-resources-selected-through-tv-urgent#dis-post-394915 <![CDATA[Re: Display Resources Selected Through TV [URGENT]]]> https://forums.modx.com/thread/70587/display-resources-selected-through-tv-urgent#dis-post-394913 and image-tv to to the front. this is a great start though... any ideas?]]> pjldesign Sep 27, 2011, 10:45 AM https://forums.modx.com/thread/70587/display-resources-selected-through-tv-urgent#dis-post-394913 <![CDATA[Re: Display Resources Selected Through TV [URGENT]]]> https://forums.modx.com/thread/70587/display-resources-selected-through-tv-urgent#dis-post-394908
Well, good news is I have a solution for you.

I could explain in writing, but these 2 screenshot will give you input checkbox and output as a comma delimited IDs.]]>
zaigham Sep 27, 2011, 10:30 AM https://forums.modx.com/thread/70587/display-resources-selected-through-tv-urgent#dis-post-394908
<![CDATA[Re: Display Resources Selected Through TV [URGENT]]]> https://forums.modx.com/thread/70587/display-resources-selected-through-tv-urgent#dis-post-394891 pjldesign Sep 27, 2011, 08:54 AM https://forums.modx.com/thread/70587/display-resources-selected-through-tv-urgent#dis-post-394891 <![CDATA[Re: Display Resources Selected Through TV [URGENT]]]> https://forums.modx.com/thread/70587/display-resources-selected-through-tv-urgent#dis-post-394881
The output of this TV will give you the IDs of selected resources. You will need to process those IDs and format the output as your specification.

eg.
[[getResources? &resources=`[[*your-resource-list-tv]]` &......... ]]


Hope it helps.]]>
zaigham Sep 27, 2011, 06:46 AM https://forums.modx.com/thread/70587/display-resources-selected-through-tv-urgent#dis-post-394881