How to get current link of a post?

Topics: Customizing Orchard, Writing themes
Jul 30, 2011 at 5:41 AM

 <iframe src="http://www.facebook.com/plugins/like.php?href=<link>&amp;layout=standard&amp;show_faces=true&amp;width=450&amp;action=like&amp;font&amp;colorscheme=light&amp;height=40"scrolling="no" frameborder="0" style="border: none; overflow: hidden; width: 450px;height: 40px;" allowtransparency="true"></iframe>

 

I want to place the current url of a post in this iframe, but I don't know how to get the link of a post. Can you help me? Thank you so much.

Developer
Jul 30, 2011 at 2:41 PM

Do you mean a blogpost?

Jul 30, 2011 at 2:46 PM

Yes, a blog post :D

Jul 31, 2011 at 5:12 AM
Jetski5822 wrote:

Do you mean a blogpost?

ContentItem item = Model.ContentItem;

   @Html.ItemDisplayLink(title, item)

I want to convert item to a url, but I don't know how to do this. I don't want to display a tag :(.

Coordinator
Jul 31, 2011 at 5:52 AM

@Url.ItemDisplayUrl is going to give you that. But you might want to try this module: http://orchardproject.net/gallery/List/Modules/Orchard.Module.Facebook.Like

Jul 31, 2011 at 6:00 AM
bertrandleroy wrote:

@Url.ItemDisplayUrl is going to give you that. But you might want to try this module: http://orchardproject.net/gallery/List/Modules/Orchard.Module.Facebook.Like

Thank you so much :x .