Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
Hello Guyz,
I’m new to umbraco.
I’m currently working on a project and I want the end user to create a page and have different banner for each page(inner pages). Please how will I go about it, using razor.
Thanks guyz.
Hi Taiwo,
You can easily get this working. What you could do is have 2 different templates, 1 homepage and the other one for the Innerpages.
Then make use of ContentPlaceHolder where you want your banner to display.
Here is a simple razor for the upload field for your banner
@{ if (!String.IsNullOrEmpty(@Model.yourAlias)){<img src="@Model.yourAlias" >} }
and here making use of recursive value
@{ var img = Model.AncestorsOrSelf().Where("yourAlias !=\"\"").Last().yourAlias; if (!String.IsNullOrEmpty(@img)){<img src="@img" >} }
Thank you so much fuji, it worked.
Hi,
Good to hear you got it working !! :)
is working on a reply...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
Individual Banners in each page
Hello Guyz,
I’m new to umbraco.
I’m currently working on a project and I want the end user to create a page and have different banner for each page(inner pages). Please how will I go about it, using razor.
Thanks guyz.
Hi Taiwo,
You can easily get this working. What you could do is have 2 different templates, 1 homepage and the other one for the Innerpages.
Then make use of ContentPlaceHolder where you want your banner to display.
Here is a simple razor for the upload field for your banner
and here making use of recursive value
Thank you so much fuji, it worked.
Hi,
Good to hear you got it working !! :)
is working on a reply...