Blog post url for OutBrain widget

This is an open forum for any mojoPortal topics that don't fall into the other categories.

This thread is closed to new posts. You must sign in to post in the forums.
7/16/2010 10:33:29 PM
Gravatar
Total Posts 47

Blog post url for OutBrain widget

trying to embed Outbrain.com's related article widget in 'BlogViewControl.ascx'

have to put blog post's permalink

	var OutbrainPermaLink = 'PERMA_LINK_HERE'; 

 

i tried using var OutbrainPermaLink = '<%= Request.Url.ToString()  %>'; 
which gives the following output and not the url which the browser window shows :(

var OutbrainPermaLink = 'http://localhost/ThCE/Blog/ViewPost.aspx?pageid=0&mid=1&ItemID=22'; 

how can we show the right url ?
thanks n regards, :)
nitin

7/17/2010 8:19:26 AM
Gravatar
Total Posts 18439

Re: Blog post url for OutBrain widget

In your code behind

protected string PostUrl = string.Empty;

in PopulateControls set this variable:

PostUrl = SiteRoot + blog.ItemUrl.Replace("~/", "/");

then you can use <%= PostUrl %>

Hope it helps,

Joe

ps the developer forum would have been a better place to ask this question

Note to other readers, I do not recommend modifying the mojoPortal source code, Nitin has cloned the blog which is the only recommended way for customizing a feature while keeping it possible to upgrade to new versions of mojoPortal.

7/19/2010 4:30:02 AM
Gravatar
Total Posts 47

Re: Blog post url for OutBrain widget

Thanks Joe :)

An embedded 'Related Articles' Feature in MojoPortal would be nice we could use either www.linkwithin.com or OutBrain (now this post should have been in Feature request too hehe)

thanks n regards,

nitin

4/3/2012 7:20:50 PM
Gravatar
Total Posts 32

Re: Blog post url for OutBrain widget

Hi loginitin,

Did your solution works?

I'm trying to use LinkWithin.

You must sign in to post in the forums. This thread is closed to new posts.