|
Member
|
shauna.gordon-fahlgren
-
5/13/2013 12:32:01 PM
ASPX Blog Template Information/Documentation?
Is there any information on building a blog using ASPX templates for Kentico 7? All of the documentation I've found only uses the Portal engine, which isn't an option for me. The only forum post I've been able to find that has gotten a response from Kentico is this one, which is less than helpful, since the Corporate Site doesn't appear to have any blog-related ASPX templates (which I assume is due to differences in 5.x vs 7).
|
|
|
Member
|
kentico_sandroj
-
5/13/2013 8:07:32 PM
RE:ASPX Blog Template Information/Documentation?
Hello, I believe that the linked article from our developers guide will have the information you are looking for. Also, adding Kentico controls and API Examples should prove to be helpful. Should you need any additional information, please let us know. Regards, Sandro
|
|
|
Member
|
shauna.gordon-fahlgren
-
5/14/2013 8:00:33 AM
RE:ASPX Blog Template Information/Documentation?
I know how to write ASPX templates in general. What I need is more information on the blog-related controls, since I've been unable to find any that aren't strictly Portal Engine related (ie - the 5.5 documentation, which only uses the Portal Engine way, and doesn't even get into setting up comments properly; it helps in the sense that it provides hints for what to do, but given that things have changed between 5.5 and 7, and the aforementioned comments issue, it's incomplete documentation at best). What I'd like to see is some actual documentation on the blog-related controls. Things like: - what controls are for what purpose (BlogCommentView vs BlogCommentsViewer vs BlogComment; PostArchive vs RecentPosts, etc) - what fields (particularly those specific to blog posts and comments) that can be used to query against - where the stock transformations are (and, for that matter, why they're split between CMS.Blog* and Community.Transformations) - information for writing one's own transformations (fieldnames, valid properties, etc) - information on pagination on a blog posts listing page (ie - show the first ten, then have pagination links that show older posts) with a blog-related control (instead of having to fall back to CMSRepeater) - what functions are available in BlogFunctions, and information on those functions (parameters, return values, etc) And no, linking to the database reference isn't sufficient, nor is linking to generic information such as documentation for pagination with the CMSRepeater, because the RecentPosts control doesn't appear to have the pagination attributes available to it (which is what has required me to use the CMSRepeater, instead of a potentially more proper control). If any of this already exists in documentation somewhere, then it's impossible to find, since searching for "Kentico blog [anything]" only returns actual blogs (since most have "blog" in their URL), instead of information on building blogs in Kentico. Even searching for other specifics, such as BlogFunctions and the control names, doesn't turn up anything.
|
|
|
Kentico Legend
|
Brenden Kehren
-
5/15/2013 8:21:14 AM
RE:ASPX Blog Template Information/Documentation?
If all else fails, look at the code in the controls to determine what they do or display. Most of what you're looking for can be found in CMSModules/Blogs/ directory. You could also look at the webparts and see how the module controls are used, this could be very helpful. Also check out the API to look what blog methods do what. Also search the devnet for "blog controls" and limit your search to forum only, I received quite a few results.
Sorry for the lack of detail in my response but these items have been very helpful to me in development using Portal. I've not and will probably never use ASPX templates within Kentico because I can create my own web parts, modules and custom controls much faster than recreating what Kentico has already done.
No offense to you or anyone who uses ASPX templates, I believe anyone who uses ASPX templates within Kentico is a stubborn programmer, because they are choosing not to learn Kentico, how to develop against it and the API behind it. Yes there are improvements Kentico could make to their documentation, API, etc. but all things considered, especially the fact that they have only been around since 2004 and have far surpassed many other CMS systems I've worked with, Kentico is by far the best and simplest asp.net CMS system to develop against.
|
|
|
Member
|
shauna.gordon-fahlgren
-
5/15/2013 8:29:53 AM
RE:ASPX Blog Template Information/Documentation?
FroggEye wrote: No offense to you or anyone who uses ASPX templates, I believe anyone who uses ASPX templates within Kentico is a stubborn programmer, because they are choosing not to learn Kentico, how to develop against it and the API behind it. Yes there are improvements Kentico could make to their documentation, API, etc. but all things considered, especially the fact that they have only been around since 2004 and have far surpassed many other CMS systems I've worked with, Kentico is by far the best and simplest asp.net CMS system to develop against.
That is kind of offensive, considering that I've already mentioned that it's not an option for me. It's not a matter of refusing or not wanting to, but a matter of not having the option due to business requirements.
|
|
|
Kentico Legend
|
Brenden Kehren
-
5/15/2013 8:35:29 AM
RE:ASPX Blog Template Information/Documentation?
Again, I apoligize for being offensive and not knowing your circumstances. For my curiosity, what business requirements require the use of ASPX over Portal? It's unfortunate for you its been this way. Development time is much faster especially for new developers to learn how to develop in Portal vs ASPX. As you've noticed already you have to learn all the in's and out's with the controls when in Portal, a simple copy of a base control with some minor modifications would allow me to have what I need in less than a few minutes.
If you would like, I'd be more than happy to spend some time with you via email or phone and go over a few items that could help (free of charge!).
|
|
|
Member
|
shauna.gordon-fahlgren
-
5/15/2013 8:51:56 AM
RE:ASPX Blog Template Information/Documentation?
FroggEye wrote: If all else fails, look at the code in the controls to determine what they do or display. Most of what you're looking for can be found in CMSModules/Blogs/ directory. You could also look at the webparts and see how the module controls are used, this could be very helpful. Also check out the API to look what blog methods do what. Also search the devnet for "blog controls" and limit your search to forum only, I received quite a few results.
I've already looked in the code, and did that the first time I tried and failed to find information elsewhere. I've yet to find the code that actually declares BlogFunctions and its containing functions (if you know where that code is located, by all means, enlighten me). The code I have found also doesn't provide much information due to the high level of abstraction (and therefore, would require a significant amount of time to track down the information that decent documentation would be able to provide in far less). Also, while your suggested search of the forums returns a lot of results, none of them are of any use as they're either ones I've already found, not relating to my questions at all, or repeats of the above (because the search will pull up responses to an original forum post, as well as the original). Unless there's API documentation that I'm unaware of (which is entirely possible), I've yet to find any useful information in the API, other than what exists and the datatype it expects.
|
|
|
Kentico Support
|
kentico_jurajo
-
5/16/2013 2:38:11 AM
RE:ASPX Blog Template Information/Documentation?
Hi, There is a whole chapter on blogs in the Developer's guide - yes, it is explained on Portal engine but, the same web parts with the same names are available in ASPX templates and the same settings apply too - you just do not set the properties in the browser and dialog window but you do in the ASPX code of the page template. So, froom the idea point of view it is exactly the same no matter if you are using portal engine or ASPX. The difference is the format and place where you are doing it. Best regards, Juraj Ondrus
|
|
|
Member
|
shauna.gordon-fahlgren
-
5/16/2013 8:26:16 AM
RE:ASPX Blog Template Information/Documentation?
kentico_jurajo wrote: There is a whole chapter on blogs in the Developer's guide - yes, it is explained on Portal engine but, the same web parts with the same names are available in ASPX templates and the same settings apply too - you just do not set the properties in the browser and dialog window but you do in the ASPX code of the page template. So, froom the idea point of view it is exactly the same no matter if you are using portal engine or ASPX. The difference is the format and place where you are doing it.
So, can you tell me where BlogFunctions is declared and/or what functions are actually contained in it? Is there a better way to add the necessary controls other than importing the controls from CMSWebParts (ie - is there something that I'm missing in the cms namespace)? And where's the section about adding a comments form? Or is that something I'm going to have to create by hand? What you've linked is great for someone who's never going to leave the webpage to build their blog (and/or is just wanting to use the templates already provided), but is woefully lacking for those looking to write the templates that others would use.
|
|
|
Kentico Support
|
kentico_jurajo
-
5/16/2013 8:36:25 AM
RE:ASPX Blog Template Information/Documentation?
Hi,
I am sorry but I am totally confused - what exactly are you looking for?
How else you want to use the blogs if you won't use the web parts (in portal engine) or use the controls from CMSWebParts folder? If you do not want to use what is built in, you have to create your own logic.
BlogFunctions are specified here: \App_Code\CMSModules\Blogs\BlogFunctions.cs (just a simple search in Visual studio or using Object browser in Visual studio is very good way to see where are things defined).
Comments: Have you added the blog comments web part to the page template?
I really do not know what the issue is - could you please describe it is details?
Best regards, Juraj Ondrus
|
|
|
Member
|
shauna.gordon-fahlgren
-
5/16/2013 10:05:41 AM
RE:ASPX Blog Template Information/Documentation?
kentico_jurajo wrote: BlogFunctions are specified here: \App_Code\CMSModules\Blogs\BlogFunctions.cs (just a simple search in Visual studio or using Object browser in Visual studio is very good way to see where are things defined).
I really do not know what the issue is - could you please describe it is details?
I had done a search in Visual Studio and it didn't return the declaration that I saw (though it may have been buried within all of the calls to it, but it's also sometimes hard telling if a function's going to be available in the code available, or if it's buried in the .dlls), hence why I asked for more information on BlogFunctions (that said, it seems like a pretty powerful set of functions that can be used in transformations and elsewhere, why do these not have proper documentation?). Thank you for finally pointing me to it. As for what the issues are: 1. From what I've been able to gather so far, in order to use any of the blog stuff in ASPX templates, I'm required to register them myself. Is this understanding correct? Or is there something in the built-in/pre-registered stuff (existing in the "cms" tag prefix) that I'm missing? 2. There is no ASPX-specific documentation (and not much documentation at all beyond "drag this control here" and end-user level tasks ("create a new blog post by right-clicking the blog node and selecting new blog post")) for the blogging module, and from what I can tell, from the ASPX side of things, the controls don't really behave as one would expect. For example, there doesn't appear to be paging capability in the any of the post-level repeaters (such as what would be on this page, displaying a summary of the recent posts - http://devnet.kentico.com/Blogs.aspx ), and if there is, it's non-standard compared to the standard CMSRepeater and there's no intuitive way to make it page. I've had to resort to using a CMSRepeater so that I could have paging capability, because I couldn't find any way to make the Blog WebPart control do paging. 3. There are, in general, a number of holes in the Kentico documentation, or they are next to impossible to search, when it comes to the blog module. As I've mentioned previously, the documentation says nothing about the BlogFunctions class and what's in it. Given this class is used even in the transformations, this seems like a pretty glaring oversight. Additionally, there are a good dozen or so "stock" blog-related transformations included in an install of a version of Kentico that includes the Community and Blog sections. There are a number of Blog transformations not only in the "Blog*" document types, but also in "Community - Transformations". Several of them appear to be the same at first, but actually behave quite a bit differently when actually implemented. Why is there no information on these starter transformations? And why are they spread between the "Community - Transformations" and "Blog*" document types? Yes, they can be changed, but if the idea of Kentico is to get a site up and running with relatively little need for customization and "tweaking", it seems to me that there should be some kind of example of the output that these different transformations generate, so that it saves the user time in picking which one they want to start with. 4. Another issue I've run into is the GetBlogCommentsCount. There appears to be a discrepancy between the parameters for it, and the CommentsViewer repeater. CommentsViewer has the option to display only approved, which will not only make it filter out spam, but also comments that weren't explicitly approved. However, GetBlogCommentsCount only checks for spam and doesn't have an option to count only approved. This means that a discrepancy can be created between what the comment count displayed on the "recent posts" page with any transformation that uses BlogFunctions.GetBlogCommentsCount to get the comment count, and the page that actually displays the comment. This, of course, can be a difficult issue to track down (and even more difficult to fix if one wants to use the "SelectOnlyApproved" option of the CommentsViewer control), when there is no documentation to be found. Comments: Have you added the blog comments web part to the page template?
Which web part includes an "add comment" form? According to the list of files in CMSWebParts/Blogs, there are 4 controls that suggest being for comments - BlogComment, BlogCommentsDataSource, BlogCommentsViewer, and BlogCommentsView. I've yet to find any information on BlogComment and BlogCommentsDataSource, and the attributes that intellisense pull up are of no real help. BlogCommentsViewer appears to be the repeater to display the comments, which I've been able to successfully do. However, none of these controls have provided any hint at creating a comment form. How else you want to use the blogs if you won't use the web parts (in portal engine) or use the controls from CMSWebParts folder? If you do not want to use what is built in, you have to create your own logic.
Where did I ever say I didn't want to use the built-in controls? I only ever said that I can't use them via Portal, and that I must use them via ASPX, which, outside of the Blog module, hasn't been that much of an issue (mainly because everything that I've needed until now has been doable with the controls already loaded into the cms tag prefix). I want to use the built-in controls for these things, I'm trying to work with the CMS (and not against it), but that's exraordinarily difficult when the controls don't provide any information about themselves, and there is zero technical documentation on them. That's why I'm here asking these questions and attempting to contribute by pointing out issues with either the system itself or the documentation (since we all know it's easy to forget that our users don't have as much, or as in depth, knowledge of the entire system as those of us that have developed a given piece of software, and that we, as developers and people with considerable experience with our own software, tend to unconsciously work around the flaws and issues in our own system).
|
|
|
Kentico Support
|
kentico_jurajo
-
5/21/2013 2:25:55 AM
RE:ASPX Blog Template Information/Documentation?
Hi, 1. The difference is that the things with cms prefix are server controls which are defined in an assembly. Which means they are hard to customize. So, most of the functionality is made by web parts which is something different (they usually inherit from some controls) but, in this case the customization is easier. 2. There is the ASPX tutorial and then, as I mentioned before, the idea is exactly the same. The only difference is that you cannot use the easy drag and drop way in a browser, but you have to write code - but this is your decision in the ASPX. Moreover, there are less and less pure ASPX developers. Regarding the paging - using the repeater is exactly the correct way. You are looking just at a small piece of the picture - just blogs, but you need to understand how it works in general. If you want to list something and e.g. have the paging, no matter if it is blog, news, wiki articles, etc. - you will use a repeater. This is a general knowledge above the particular blog piece. 3. We have improved the documentation in v8. The sample sites can be considered as a hands-on documentation. The difference is because those sites have different purposes - e.g. in the corporate site, the user does not want to have all the features and all the things she won't use on the site. However, if you are looking for a blogging site, which is more a social or community site - you should install the community sample site and take look there how thigs are done. The same can be applied to Intranet portal - there are transformations set differently to show the intranet and how it works there. 4. Comments - it is the Blogs/BlogCommentView.ascx web part. Just checking the parent /CMSModules/Blogs/Controls/BlogCommentView.ascx control, you would see it contains the form for adding comment. Or, by checking the source file of the web part used in the portal engine sample (Site Manager -> Development -> Web parts -> Blogs -> Comments -> Comment view -> General tab). Where did I ever say I didn't want to use the built-in controls?
- I was talking about web parts, explained in no.1. You need to use built-in web parts. Best regards, Juraj Ondrus
|
|
|