sranjan
New Creator

No target selected

We are getting no target selected error at $CMS_IF(entry.st_gallery.get != null)$

 

Please help.

0 Kudos
2 Replies
j_mueller
Elite Observer

Seems like there's nothing selected in your reference editor. Usually the no target selected error is thrown inside $CMS_REF()$ function.

Have you tried checking with $CMS_IF(!entry.st_gallery.empty)$ instead?

Then if the editor is not empty, you can proceed retrieving the selected object.

Kind regards

0 Kudos
sivaprasad9394
Occasional Collector

HI Sranjan,

You have not selected any image in FS_REFERENCE component.

<FS_REFERENCE
name="st_picture"

------

----------

</FS_REFERENCE>

$CMS_IF(!st_picture.isEmpty)$	
   <div class="bottom">
	<img src="$CMS_REF(st_picture,resolution:"rsImage")$">
   </div>
$CMS_END_IF$

In the above code if required use resolution else omit it.

one more point check for Image is a language dependent or not.If yes then check for page language all the pages image is selected properly. If not also we get the error.

I hope this will help you.

 

 

0 Kudos