Domanda

I have created a local index for the purpose of user being able to upload images for an image gallery. I just want to be able to access the images from within that local index, but can't work out how to access the contents of the local index.

I have been able to get the index with: $.getBean("feedManager").read('F78748AB-BADD-5E7F-86890BE17C0E11E8').

With this, I can see the appropriate properties for the local index, however I can't see, nor find a way to access the content items within that feed. In particular, I just want to be able to get to the related image for each item.

I am able to view the items via the RSS feed.

Many Thanks in advance for any pointers.

Jason

È stato utile?

Soluzione

feed = $.getBean("feedManager").read('F78748AB-BADD-5E7F-86890BE17C0E11E8')

Your code returns you the feedBean for your local index. The next step is to ask the feedBean for the content. The content can be returned in two formats: a Query object or an Iterator.

Query:

feed.getQuery();

Iterator:

feed.getIterator();

If you ask for the query format you can loop over it using the 'cfloop'-tag with the 'query'-attribute.

If you ask for the iterator this documentation will help you looping over an iterator in Mura (the documentation if for a content iterator, but the concept is the same): http://docs.getmura.com/developer-guides/back-end-development/content-iterator/

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top