PageLink problem

Vote:
 
Hallo everyone :) I’m not sure where to ask my question, but this is the only place I found so I’m testing here :) OK, so to my problem, I have a Newslist that are getting data from combined datasource (3 different trees in the site). This newslist is writing all data out and adds some texts and an image. So far so good, but I want the image to link to the article. I did think that this was the right way to do it (event_img is a property assigned to each article in the editor). ">" /> But this code doesn’t produces the right link. The links look like this: /en/141 for example. So it’s the language of the site and then the id nr of the page. Just to test one thing I added a property controller on the next line in the cood. And that one procuce the right link, for example /en/show/event/showname/Default.aspx So pagelink and pagelink isnt the same. Anyone knows what I have done wrong?
#11365
Mar 20, 2007 17:45
Vote:
 
The Property web control sees the type of the PageLink to be a PageReference, and automatically renders a link with the url and the name. When coding against the PageData object (which is what you're doing with Container.CurrentPage), you should use "PageLinkURL" instead. Your code will be evaluated as PageReference.ToString(), which will output the id of the page. See the SDK, Class Libray, EPiServer.Core, Classes, PageData, Properties and the Property member for a (semi) complete list of these properties. Btw, you'll find the developer forums on www.episerver.com/devforum /Steve
#11737
Mar 20, 2007 20:59
Vote:
 
Worked perfect! :) Thanks :) I will look at devforum towmorrow, have one more question that have problem with, so thanks for that tip to. :)
#11738
Mar 20, 2007 22:55
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.