This is a migrated thread and some comments may be shown as answers.

adding a href to the announcements in the Jitterz demo

4 Answers 23 Views
General Discussion
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Jake
Top achievements
Rank 1
Jake asked on 13 Jun 2013, 10:26 PM
Hello all, I have been trying out the demos from the sample projects, they have really helped me out i was having a look at the Jitterz coffee shop demo and I have been trying to add a href to one of the announcements so that I can redirect it to another page or view but I have reached my limit with everything I know what I'm i missing from the link? if you could point me in the right direction it would be greatly appreciated!!

_announcements = [
{ title: "Holiday Drinks Are Here", description: "Enjoy your favorite holiday drinks, like Pumpkin Spice Lattes.", url: "images/holiday.png" },

Many thanks

J

4 Answers, 1 is accepted

Sort by
0
Steve
Telerik team
answered on 14 Jun 2013, 02:31 PM
Hi Jake,

You would have to change the listview template to contain the hyperlink e.g.:

<!-- Home page template -->
        <script type="text/x-kendo-template" id="announcement-listview-template">
            <a href="http://www.icenium.com" data-rel="external"><img class="item-photo" src="${url}" /></a>
            <h3 class="item-title">${title}</h3>
            <p class="item-info">${description}</p>
        </script>

Make sure you're using Kendo UI Mobile v2013.1.319 or later, you can check that by opening the kendo.mobile.min.js and version would be on top.

Regards,
Steve
Telerik

Looking for tips & tricks directly from the Icenium team? Check out our blog!
Missed our first webinar, watch it here.
Share feedback and vote for features on our Feedback Portal.
0
Jake
Top achievements
Rank 1
answered on 17 Jun 2013, 03:56 PM
Many thanks Steve, very much appreciated!!

I have the latest Kendo UI Mobile package and it works a treat, but all announcements points to the one href, how do I assign each announcements a href?

Again Many thanks for your reply 

Jake
0
Accepted
Steve
Telerik team
answered on 18 Jun 2013, 07:48 AM
Hi Jake,

Add additional member to the _announcements array that would contain the desired url and replace the hardcoded url I gave in the sample template with the newly added member e.g.:

<a href="${newurl}" data-rel="external"><img class="item-photo" src="${url}" /></a>

Regards,
Steve
Telerik

Looking for tips & tricks directly from the Icenium team? Check out our blog!
Missed our first webinar, watch it here.
Share feedback and vote for features on our Feedback Portal.
0
Jake
Top achievements
Rank 1
answered on 18 Jun 2013, 01:49 PM
Many thanks Steve, very much appreciated !!
Tags
General Discussion
Asked by
Jake
Top achievements
Rank 1
Answers by
Steve
Telerik team
Jake
Top achievements
Rank 1
Share this question
or