-
- 58 Posts
Here is my getResources call
[[!getResources?
&parents=`99`
&tpl=`OfficerListTpl`
&includeTVs=`1`
&processTVs=`1`
&tvPrefix=``
&includeContent=`1`
&limit=`0`
&sortby=`menuindex`
&sortdir=`ASC`
]]
One of the resources returned is a symlink to a resource outside of the parent container. It is not displaying the content or TVs of the resource.
here is the Tpl
<h4 class="page-header">[[+Office]]</h4>
<div class="row">
<div class="col-xs-4 col-sm-3">
<img src="[[++site_url]][[+Photo]]" alt="Photo of [[+pagetitle]]" class="img-responsive img-thumbnail"/>
</div>
<div class="col-xs-8 col-sm-9">
<strong>[[+pagetitle]]</strong>
[[+Institution]]
[[+Address]]
[[+City]], [[+State]] [[+ZipCode]]
[[+Email]]
Phone: [[+Office Phone]]
Fax: [[+Fax]]
</div>
</div>
Any suggestions or advice?
Roy
GetResources only gets the value for the resources it is told to get. It has no way to follow any symlinks to get the values for the linked resource.
You might be able to do something about it in the tpl. Have a snippet to check if the resource being processed is a symlink, and if it is, fetch its content.
-
- 58 Posts
I found a solution. I added a TV used as a filter in the GetResources call. My call starts above the level of the symlink so it finds the content that is tagged with the appropriate TV.
This added a level of complexity to the overall site structure but allows me to keep the abstraction level when editors are viewing the site structure in the resources tab.
Roy