guillaume.marquilly-tv5monde
-
8/14/2012 8:58:24 PM
Homepage with repeater containing files from a other location
Hi,
Like a lot of informations websites, I would like to design an homepage that contains a repeater to display the last articles.
I created a custom document type, ArticleTV5, with the document type Folder as an available parent in the treeview. Also I created these fields: ArticleTV5ID, Description, Content, Category, Image, ImageCopyright, Contributor
Finally I created a folder tree.
My website looks like below:
Root (masterpage) ----- Articles (folder) --------------- 08-2012 (folder) ------------------------- article 1 (article2) ------------------------- article 2 (article2) ------------------------- article 3 (article2) --------------- 09-2012 (folder) ------------------------- article 4 (article2) ------------------------- article 5 (article2) ------ Home (menuitem/webpage)
I can display my articles in the homepage main repeater using this basic transformation:
<table border='1' style="border-collapse:collapse;" width='80%'> <tr> <td width="60" valign="top"> <%# IfEmpty(Eval("Image"), "", "<img alt=\"" + Eval("DocumentName",true) + "\" src=\"" + GetFileUrl("Image") + "?maxsidesize=100\" />") %></td> <td> <h2><a href="<%# GetDocumentUrl() %>"><%# Eval("DocumentName",true) %></a></h2> <p><%# IfEmpty(Eval("Description"), Eval("Content"), Eval("Description")) %></p> </td> </tr> </table>
but I encounter some problems with the "selected" transformation (the default transformation for example). It looks like my master page is repeated inside my placeholder as many times as the number of folders' levels and I can't display my whole selected article.
I know that I can put my articles as subelements from my homepage to avoid this issue, but i'm not satisfied because of the displayed UR: hostname/Home/Articles/08-2012/blablabla.asp. I would prefer to have this kind of URL: hostname/Articles/08-2012/blablabla.aspx when im on a selected article.
Is my design possible? What are the different solutions to design something like that?
Thank you,
|