A Resource with no alias could never be displayed by a browser. It sounds like what you're looking for is a Chunk. You put the text in the Chunk and use a chunk tag where you want it to appear in a page.
If you need to display them with getResources, though, you can't use Chunks. It might work to leave them unpublished and tell getResources to include unpublished resources, but you would have to have a custom snippet to prevent getResources from presenting them as links if other pages in the same list will be links.
I'm not sure about your second question (search). I generally use Google's site search on my pages. It would definitely find any text as long as it appears on the page. I don't know if any of the MODX search extras would find it or not.
Thanks for your help, Bob! The problem is, that I cannot use TVs in Chunks like I can use them in resources (e.g. image upload) and I would have to jump between resources and elements tab, which is uncomfortable.
I am using the getRelated plugin to display related articles and I don't want to display those resources that are only used as small teasers, because there is mostly only a picture, a headline and intro text (no content).
New idea: is there a way to load only searchable resources with getResources? So I would just deselect searchable in settings tab of those resources I don't want to be loaded.
discuss.answer
Yes, you can use the &where property:
&where=`{"searchable":1}`
I've never used getRelated, but it doesn't appear to have a &where property, so probably not.
-
☆ A M B ☆
- 3,141 Posts
Feature requests are of course welcome:
https://github.com/Mark-H/getRelated