• Posts: 10
  • Joined: 20/08/2013
Hi All,

I have been playing around with the sample web application, and I have set up a bootstrap carousel to display the newest 5 posts from a specific forum, basically acting as a "latest news" slider on the front page.

Currently i use a regexp to get the url for the background image from with the first [img=.....][/img] tags, and also use the topic title and description overlaid on the image, however I was wondering what would be the best way to generate a link to the topics themselves from within asp.net so that when a user clicks the carousel it redirects to the actual forum topic? Is there an existing method that takes a topic or post id and generates a URL that I can use by any chance?

Does that make sense at all?

Thanks in advance

  • Posts: 10
  • Joined: 20/08/2013
Sorted now, used the below to build the link

  '<%# YafBuildLink.GetLink(YAF.Types.Constants.ForumPages.posts, "t={0}", Eval("TopicID")) %>' 

thought i'd reply here incase this helps somebody else 🙂
  • Posts: 1077
  • Joined: 26/04/2011
Sounds interesting. Do you have a live demo of this and also the source code? I'd be interesting replicating it.
  • Posts: 10
  • Joined: 20/08/2013
Hi Zero,

I don't have a live demo sorry, but i'll happy share any code etc with you.

Basically, it consists of a database view, bootstrap carousel, and an asp repeater to repeat the inner items of the carousel per row returned to the repeater.

PM me if you would like more info/source code


Forum Jump  
  • You cannot post new topics in this forum.
  • You cannot reply to topics in this forum.
  • You cannot delete your posts in this forum.
  • You cannot edit your posts in this forum.
  • You cannot create polls in this forum.
  • You cannot vote in polls in this forum.

About Us

The YAF.NET is an open source .NET forum project. YAF.NET is supported by an team of international developers who are build community by building community software.

Powered by Resharper Donate with PayPal button

Project Twitter Updates

Copyright © YetAnotherForum.NET & Ingo Herbote. All rights reserved