home
products
contribute
download
documentation
forum
Home
Forums
New posts
Search forums
What's new
New posts
All posts
Latest activity
Members
Registered members
Current visitors
Donate
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Search titles only
By:
Menu
Log in
Register
Navigation
Install the app
Install
More options
Contact us
Close Menu
Forums
MediaPortal 1
WebService and Mobile Access
Popular Plugins
MPExtended
WebMediaPortal Design
Contact us
RSS
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="sweborn" data-source="post: 858041" data-attributes="member: 52147"><p>[ATTACH]102072[/ATTACH]</p><p> </p><p>I would like to have a overview that looks like this. But I'm not a big shot on coding pages.</p><p>I want to link every cover to the details page.</p><p>Please can anyone give it a try.</p><p>Here is my code so far:</p><p> </p><p>[CODE]@model IEnumerable<MPExtended.Services.MediaAccessService.Interfaces.Movie.WebMovieBasic></p><p>@{</p><p> ViewBag.Title = "Movies";</p><p>}</p><p> </p><p>@{</p><p> if (@Model != null && @Model.Count(p => p.Title != "") > 0)</p><p> {</p><p> <h2>Movies</h2></p><p></p><p> </p><p> foreach (var movie in Model)</p><p> {</p><p> <a href="https://www.team-mediaportal.com" target="_blank"></p><p> </p><p> <img src="@Url.Action("Image", "MovieLibrary", new { movie = movie.Id })" alt="" width="190" height="260"/></a></p><p> </p><p> } </p><p> </p><p> }</p><p>}[/CODE]</p><p> </p><p>Instead of this test line</p><p><a href="<a href="https://www.team-mediaportal.com" target="_blank">https://www.team-mediaportal.com</a>" target="_blank"></p><p>i think you should use something like this</p><p>@Html.ActionLink(movie.Title, "Details", "MovieLibrary", new { movie = movie.Id }, null)</p></blockquote><p></p>
[QUOTE="sweborn, post: 858041, member: 52147"] [ATTACH]102072[/ATTACH] I would like to have a overview that looks like this. But I'm not a big shot on coding pages. I want to link every cover to the details page. Please can anyone give it a try. Here is my code so far: [CODE]@model IEnumerable<MPExtended.Services.MediaAccessService.Interfaces.Movie.WebMovieBasic> @{ ViewBag.Title = "Movies"; } @{ if (@Model != null && @Model.Count(p => p.Title != "") > 0) { <h2>Movies</h2> foreach (var movie in Model) { <a href="https://www.team-mediaportal.com" target="_blank"> <img src="@Url.Action("Image", "MovieLibrary", new { movie = movie.Id })" alt="" width="190" height="260"/></a> } } }[/CODE] Instead of this test line <a href="[url]https://www.team-mediaportal.com[/url]" target="_blank"> i think you should use something like this @Html.ActionLink(movie.Title, "Details", "MovieLibrary", new { movie = movie.Id }, null) [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
MediaPortal 1
WebService and Mobile Access
Popular Plugins
MPExtended
WebMediaPortal Design
Contact us
RSS
Top
Bottom