In this blog post I am going to show you how you can easily create a broker query with various kinds of criteria specified. I will be using Tridion 2013 and Visual Studio 2010 in this case.
In my
example I have a .NET user control, which is placed inside a Frontend project.
Its goal is to list all the components from Tridion that are using a certain
schema.
First of
all, let’s start with the user control. Here is how mine looks like:
ucListItems.ascx
We create an unordered list and inside of it, is where the magic is going to happen. There we make a Repeater which will bind all the results from the query. These are going to be returned as list items, containing all the information, with the help of a Component Template.
Now let’s go to the code behind of this control and start with the main implementation that is the topic of the blog post. I am explaining everything with comments inside the code block bellow:
ucLatestNews.ascx.cs
Now let’s go to the code behind of this control and start with the main implementation that is the topic of the blog post. I am explaining everything with comments inside the code block bellow:
ucLatestNews.ascx.cs
That’s it! Now we are ready to get all the components with schema, which we specified by its id, and display these as we wish. You can go on and give it a try.
Please, don't forget to:
- add the user control to a page where you want to display the components
- make sure that the components are published
- make sure you have the right Tridion DLLs (netrtsn, Tridion.ContentDelivery.Configuration, Tridion.ContentDelivery, Tridion.ContentDelivery.Interop, xmogrt). It is imporant to have these in 32-bit or 64-bit depending on your project
- make sure you have all the JARs from Tridion
- make sure you have configured correctly the config files of Tridion
This comment has been removed by the author.
ReplyDeleteI definitely enjoying every little bit of it. It is a great website and nice share. I want to thank you. Good job! You guys do a great blog, and have some great contents. Keep up the good work. Compare south african brokers
ReplyDeleteOther automated trading platforms got us accustomed to some mandatory features in a good bot: it should run on a cloud accessible via all devices, it should have arbitrage opportunities, signals and support a lot of exchanges. Bitsgap does all of that with their platform and adds extra features with arbitrage and demo interface. Bitcoin bot.
ReplyDeleteEyal Nachum is a fintech guru and a director at Bruc Bond. Eyal is the architect of the software that SMEs use to do cross-border payments.
ReplyDelete