I am new in this forum and it is my first post as well :). I newly start working in umbraco v5 before that i dont have any knowlegde in perious versions. Last few days i have been developing a site in umbraco and i successed to implement all static pages.
Now i am struck with search functionality. How can i search site contents?. I searched alot and configured umbraco with visual studio 2010 to write some code for search. I am trying to write a Surface controller to implement the search but i dont have any clue what i need to call in that controller :(. I found following code for search but i getting error that Content is not in namespace. This is panic satution for me and no idea what to do :(
@Jan Skovgaard & Kasper Dyrvig thanks for your reply. Thats very sad to know that. I am working for client and site has been uploaded last week. Only search funtionality for pending i spent about more than 3 days to find a solution and lastly i decided to ask from the fourm. Anyways, you guys have very experience can you please suggest me what is best option in that satution i will discuss with my boss tomorrow. I will real appreciate your valuable comments.
@Kasper Dyrvig thanks for your reply. I am going to start work in umbraco 4.7.2 instead to v5. Is this good choice or I should use previous versions before umbraco 4.7.2.
and geting Error loading MacroEngine script (file: ).
Lastly i failed to find a way to get image (uploader property) in a page. For slider i used xslt file and its working fine but i am not sure how can i get image in a page without xslt.
Hi Kasper, thanks for your reply. Actually in my site each page has an top image and I created a property upload for that purpose. Now when I am trying to show image using that following code
@{ if (Model.HasProperty("topImage")) { <img src="@Model.topImage" alt="" /> } else { <p> This page doesn't contain a MediaPicker property with the alias of 'topImage' or No image is selected on this page </p> } }
urgent help to implement search in Umbraco v5
Hi all,
I am new in this forum and it is my first post as well :). I newly start working in umbraco v5 before that i dont have any knowlegde in perious versions. Last few days i have been developing a site in umbraco and i successed to implement all static pages.
Now i am struck with search functionality. How can i search site contents?. I searched alot and configured umbraco with visual studio 2010 to write some code for search. I am trying to write a Surface controller to implement the search but i dont have any clue what i need to call in that controller :(. I found following code for search but i getting error that Content is not in namespace. This is panic satution for me and no idea what to do :(
Umbraco.Hive.Content.Where(x => x.ContentType.Alias == "News" && x.Field("bodyText").Contains("YOURKEYWORD")).ToList();
Please, I really request to if someone can help me regarding that issue or give some idea how can i do. I really appreciate it
Thanks
Hi Usman,
I don't have a solution for your question. But I thought I needed to tell you that there is no future with v5. Last week it was announced that Umbraco 5 is dead (see the keynote: http://codegarden12.com/sessions/day-one/keynote/keynote.aspx).
Hope you find a solution anyway.
Hi Usman and welcome to our :)
As Kasper says above Umbraco 5 is dead.
The site you're currently working on is that for a client or is it a hobby project?
/Jan
@Jan Skovgaard & Kasper Dyrvig thanks for your reply. Thats very sad to know that. I am working for client and site has been uploaded last week. Only search funtionality for pending i spent about more than 3 days to find a solution and lastly i decided to ask from the fourm. Anyways, you guys have very experience can you please suggest me what is best option in that satution i will discuss with my boss tomorrow. I will real appreciate your valuable comments.
Thanks
Well, I haven't worked that much with v5. Hopefully some else in the community will give an advise.
@Kasper Dyrvig thanks for your reply. I am going to start work in umbraco 4.7.2 instead to v5. Is this good choice or I should use previous versions before umbraco 4.7.2.
Thanks
No that's great. I'm just about completing a website (www.best-travel.se) build in that version with no problems what so ever.
Ok, great. I have few questions regarding umbraco 4.7.2. I just started to convert v5 site to 4.7.2.
How i can enable Razor in 4.7.2 i trying to use it but getting some issues for example
@using umbraco.MacroEngines
@{
}
<img src='@image.UmbracoFile' alt='@image.Name' />
and geting Error loading MacroEngine script (file: ).
Lastly i failed to find a way to get image (uploader property) in a page. For slider i used xslt file and its working fine but i am not sure how can i get image in a page without xslt.
Please help me i very new in umbraco staff.
Thanks
I am not 100 % sure what you're asking, but I understand from the code you try to display an image selected in the current page?
You are almost there.
The code above checks if the current page has a "topImage" selected and then show it.
Hi Kasper, thanks for your reply. Actually in my site each page has an top image and I created a property upload for that purpose. Now when I am trying to show image using that following code
and I wrote it in TopImage.cshtml file. When i insert a macro into my web page it gave me following error.
Error loading MacroEngine script (file: TopImage.cshtml)
I am wondering why i am getting this error even my file into macroScripts folder and have extension .cshtml.
Are am I missing some library files for Razor? Can you please help me.
Thanks
Hi, this code is working for me. I don't know what was wrong in above mentioned code. I modify it and its working.
Thank you so much you helped me alot I really appreciated!
@@inherits umbraco.MacroEngines.DynamicNodeContext
@{
if (Model.HasProperty("topImage"))
{
<img src="@Model.topImage" alt="" />
}
else
{
<p>
This page doesn't contain a MediaPicker property with the alias of 'topImage'
or No image is selected on this page
</p>
}
}
Hi everyone
I have very strange issue with umbraco 4.7. When I try to open razor file
Hi Roman,
What issue are you facing can you please paste your error here
is working on a reply...