How can I get the main image from for example NuevaNoticia.cshtml to Noticias.cshtml
Hi!
I'm just new in umbraco 7, I have a issue and need understanding how to get an image url from another page, not the current page.
I have a string variable working normally in the page NuevaNoticia.cshtml as bellow:
So I use the @principalImageUrl to call the image and is working properly, but how can I call the image to the Noticias.cshtml?
I'm using a @foreach to set the new "NuevaNoticia" in the "Noticias" page, the only thing is broken is the image in the Noticias.cshtml.
Another question related:
And how can I make like just to show 4 items in the Noticias.cshtml with the option of selecting the page number with the same number of items and the prev and last buttons?
How can I get the main image from for example NuevaNoticia.cshtml to Noticias.cshtml
Hi!
I'm just new in umbraco 7, I have a issue and need understanding how to get an image url from another page, not the current page. I have a string variable working normally in the page NuevaNoticia.cshtml as bellow:
So I use the @principalImageUrl to call the image and is working properly, but how can I call the image to the Noticias.cshtml?
I'm using a @foreach to set the new "NuevaNoticia" in the "Noticias" page, the only thing is broken is the image in the Noticias.cshtml.
Another question related:
And how can I make like just to show 4 items in the Noticias.cshtml with the option of selecting the page number with the same number of items and the prev and last buttons?
Help!
Thanks!
Hi!
I already solved!
For the image issue:
<img src="@Umbraco.Media(item.GetPropertyValue("mainImage").ToString()).Url?anchor=center&mode=crop&w=400&h=275" />
And for the pagination question I get this example :
A quick & easy razor pagination to plug into an Umbraco View, Partial View, or Macro. From a GitHub Contributor
is working on a reply...