Hello-
I'm trying to add a tag cloud to my topic content, but not having any luck.
While editing my content topic in the admin area, I'm just including the following line of code in the table cell where I want the tag cloud to appear:
@Html.Action("PopularProductTags", "Catalog")
Is there something preventing razor syntax from executing when it's dynamically retrieved from a database column? Or do I just need to reference some other assembly from the TopicBlock.cshtml or MegaMenu.cshtml views? If so, which one, and how/where?
Thanks for your assistance!
Steve
Hi Steve,
You can not add
@Html.Action("PopularProductTags", "Catalog")
in a topic content, because it is not compiled in razor. If you want to add a tag cloud to the
Mega Menu, you need to open the
MegaMenu.cshtml view that is located in
/Plugins/SevenSpikes.Nop.Plugins.MegaMenu/Views/MegaMenu/.
Once you have opened the view add the following code, on the place where you want the menu to appear:
<li>
<a href="#">@T("Products.Tags.Popular")</a>
@Html.Action("PopularProductTags", "Catalog");
</li>
Have a great day!
Ivan Stoyanov
Hmmm....
That's not quite what I had in mind..I do not want the tag cloud to be a menu item on my megamenu. Rather, I want it as part of the content on my topic page. Is there really no way around this hurdle?
What about this??
Is it possible for me to just create an HTML form with a select field storing all the popular tags as options, and use javascript to change the location (URL) based on the user's selection. This would also need to be inside the content of my topic page. Can javascript be included within a topic page?
If so, and because my site is on IIS, can I also use inline ASP/VBScript in the topic page content to retrieve a recordset of the popular tags and iterate them within my select field?
This will allow me to configure "symptoms" and "conditions" as tags and associate each of my products with the conditions they are useful for treating, or the symptoms that the products help to alleviate.
Thanks,
Steve