Hi guys, I'm trying to build a page that returns all content that has a matching tag, in this case, I'm just using a test tag, but ideally, I would modify this to pull the tags from a URL string etc.
I have the above in a template, which works, but obviously no master template, its when I add a template of say Master, that I get this:
Cannot bind source content type Umbraco.Web.PublishedContentModels.SearchResults to model content type Umbraco.Web.PublishedContentModels.Master. Both view and content models are PureLive, with same version. The application is in an unstable state and should be restarted.
I think I'm merging 2 types of data, but not sure how to resolve!
I can't find any documentation from recent years on using tags the best way, maybe this isn't the best way? so any help appreciated! thanks!
Ideally id like some method to do the below:
If one tag is given, look for matches
if multiple tags are given, look for anything that contains any of the given tags
Issue being that the above code only works for 1 tag i think?
Well, I moved your code into a partial view and placed the partial view on the search template page. It seems to be working fine for me. This might solve your issue#1. Will this work or am I missing something?
Hey, when I give the page a template, so Layout = master.cshtml for example, it gives me that error. Also point number 1 is no good unless point 2 also works, 1 tag is useful in some scenarios but for stuff like related articles, you want to compare all tags to all tags really.
Tags in Umbraco 7.12.1
Hi guys, I'm trying to build a page that returns all content that has a matching tag, in this case, I'm just using a test tag, but ideally, I would modify this to pull the tags from a URL string etc.
I have the above in a template, which works, but obviously no master template, its when I add a template of say Master, that I get this:
I think I'm merging 2 types of data, but not sure how to resolve!
I can't find any documentation from recent years on using tags the best way, maybe this isn't the best way? so any help appreciated! thanks!
Ideally id like some method to do the below:
Issue being that the above code only works for 1 tag i think?
Well, I moved your code into a partial view and placed the partial view on the search template page. It seems to be working fine for me. This might solve your issue#1. Will this work or am I missing something?
Hey, when I give the page a template, so Layout = master.cshtml for example, it gives me that error. Also point number 1 is no good unless point 2 also works, 1 tag is useful in some scenarios but for stuff like related articles, you want to compare all tags to all tags really.
Hope that makes sense.
is working on a reply...