1) I was trying to find where the view was for this page and was not able to find. I am thinking I could create my own view like i did for recent blog entries however i was a bit stumped when i tried to figure out how blog/categories was getting rendered (i mean it must be using a view somewhere right?)
2) It doesn't look like we have the .cs code files for Articulate (are they available somewhere?) maybe the view is within that solution/project?
You can find the source code for Articulate here https://github.com/Shazwazza/Articulate - That should make it possible for you to fork it and make your own version of just explore the source code to figure out what goes on behind the scenes.
Hope this helps in regards to your second question.
As the documentation states, each theme exposes various features, not all themes support the categories/tags page (categories are also tags which is why it is named that way)
I am trying to create a partial view which I could place on the master page to show the categories.
@Html.Partial("/App_Plugins/Articulate/Views/displayblogcategoriesonhomepage.cshtml", new Articulate.Models.ListModel(Umbraco.Content(1103)))
In my partial view I have the following
@inherits Umbraco.Web.Mvc.UmbracoViewPage
var articulateMasterModel = Model as IMasterModel;
var rr = Model;
//var asArray = root.Tags.ToArray();
}
Comparing to the Tags.cshtml that exists in the Vapor theme, how do I navigate from IMasterModel to Articulate.Models.TagListModel in order to iterate over the categories? What is confusing is the hierarchy from IMasterModel to the Articulate object model.
I have googled looking for clues but still no success. Any help would be very much appreciated.
I think I was able to work through this. The umbraco model is quite new to me and it seems I am missing some base concept right now.
This is what I have working.
In my master page
@Html.Partial("/App_Plugins/Articulate/Views/displayblogcategoriesonhomepage.cshtml", new Articulate.Models.ListModel(Umbraco.Content(1103)))
In my partial view
@using Articulate
@using Articulate.Models
@using Umbraco.Core
@using Umbraco.Web
@inherits Umbraco.Web.Mvc.UmbracoViewPage<IPublishedContent>
@*@inherits Umbraco.Web.Mvc.UmbracoViewPage<dynamic>*@
@{
var articulateMasterModel = Model as IMasterModel;
//var con = Umbraco.Content(1103);
//var categories = Umbraco.GetAllCategories(articulateMasterModel);
var categories = Umbraco.GetPostTagCollection(articulateMasterModel);
}
<h3>Categories</h3>
<ul>@{
int i = 0;
foreach (var cat in categories)
{
<li>
<a href="@cat.TagUrl">@cat.TagName</a> - (@cat.PostCount)
</li>
i += 1;
}}
</ul>
While the above works, it was very confusing that I had to send as parameter new Articulate.Models.ListModel(Umbraco.Content(1103). I guess that represents the IPublishedContent (root node blog) and so I then found a helper which gave me the tagcollection.
Where would I find some documentation on this type of architecture?
Categories page with Articulate
So I was able to get my blog articles on the home page of my umbraco site..great.
I was looking at categories next and found the list of categories via a link like http://localhost/blog/categories
1) I was trying to find where the view was for this page and was not able to find. I am thinking I could create my own view like i did for recent blog entries however i was a bit stumped when i tried to figure out how blog/categories was getting rendered (i mean it must be using a view somewhere right?)
2) It doesn't look like we have the .cs code files for Articulate (are they available somewhere?) maybe the view is within that solution/project?
thanks
Hi Dave
You can find the source code for Articulate here https://github.com/Shazwazza/Articulate - That should make it possible for you to fork it and make your own version of just explore the source code to figure out what goes on behind the scenes.
Hope this helps in regards to your second question.
/Jan
Where would the view be for 'categories'?
thx
All views are part of the theme. The view for categories is:
~/App_Plugins/Articulate/[THEMENAME]/Views/Tags.cshtml
for example, see the Shazwazza theme views:
https://github.com/Shazwazza/Articulate/tree/master/Articulate.Web/App_Plugins/Articulate/Themes/Shazwazza/Views
As the documentation states, each theme exposes various features, not all themes support the categories/tags page (categories are also tags which is why it is named that way)
Great
I am trying to create a partial view which I could place on the master page to show the categories.
@Html.Partial("/App_Plugins/Articulate/Views/displayblogcategoriesonhomepage.cshtml", new Articulate.Models.ListModel(Umbraco.Content(1103)))
In my partial view I have the following
@inherits Umbraco.Web.Mvc.UmbracoViewPage
}
Comparing to the Tags.cshtml that exists in the Vapor theme, how do I navigate from IMasterModel to Articulate.Models.TagListModel in order to iterate over the categories? What is confusing is the hierarchy from IMasterModel to the Articulate object model.
I have googled looking for clues but still no success. Any help would be very much appreciated.
I think I was able to work through this. The umbraco model is quite new to me and it seems I am missing some base concept right now.
This is what I have working.
In my master page @Html.Partial("/App_Plugins/Articulate/Views/displayblogcategoriesonhomepage.cshtml", new Articulate.Models.ListModel(Umbraco.Content(1103)))
In my partial view
While the above works, it was very confusing that I had to send as parameter new Articulate.Models.ListModel(Umbraco.Content(1103). I guess that represents the IPublishedContent (root node blog) and so I then found a helper which gave me the tagcollection.
Where would I find some documentation on this type of architecture?
thx
is working on a reply...