Hi,
I'll try to answer all of your questions, but before I start note that if you want to use the
LLBLGen ORM (that is the
ORM MonoX uses) please take a look at the
LLBLGen documentation
here.
1. I want to add new functionality on Blog Page. There will be a ADD TO FAVORITE button on each blog.
On clicking this blog will be added to users favorite table(NEW TABLE).
1. First of all you will need to create your own
LLBLGen solution and add the custom table, regenerate the
LLBLGen solution and use it in your code as you will get the
YoutTableEntity object.
2. On the custom action that will provide the Add to favorites functionality you can use the
UrlParams.Blog.BlogSlug object to get the
BlogSlug and then you can use the
BlogRepository.GetInstance().GetBlog method to get the Blog object so you can save the Blog Id to your table.
2. On right hand side of blog page there is a blog list. Here in the list I want show only the favorite blogs of the user.
You can extend the existing MonoX WebPart that is used to show the Blog list or you can create your own WebPart for favorite blogs, you need to decide what approach you want to use. Get back to use with the approach so we can guide you.
3. On the right panel of this page I want another section where I will place a text box and button for my work.
Blog demo page that you are looking is located at ~\
Portal\Blog.aspx and you can add your code below the following mark-up
<
portal:PortalWebPartZoneTableless
HeaderText='<%$ Code: PageResources.Zone_RightPartZone %>' ID="rightWebPartZone" runat="server" Width="100%" ChromeTemplateFile="RightColumn.htm" ShowChromeForNonAdmins="true">
<
ZoneTemplate
>
<
MonoX:BlogInfo
ID
=
"blogInfo"
CacheDuration
=
"600"
HideIfEmpty
=
"true"
runat
=
"server"
/>
<
MonoX:BlogList
ID
=
"blogList"
CacheDuration
=
"600"
HideIfEmpty
=
"true"
runat
=
"server"
/>
<
MonoX:TagCloud
ID
=
"tagCloud"
CacheDuration
=
"600"
HideIfEmpty
=
"true"
runat
=
"server"
/>
<
MonoX:BlogCategories
ID
=
"blogCategories"
CacheDuration
=
"600"
HideIfEmpty
=
"true"
runat
=
"server"
/>
</
ZoneTemplate
>
</
portal:PortalWebPartZoneTableless
>
secondly how can I change the used table.
Suppose previously Table Blogs is being used.
Now I want to use FavBlog table(New Table).
How to do this ???
To change / switch the Blog table to FavBlog table would require you to have a MonoX source code if you are talking about the switching all the MonoX Blog WebParts to use the FavBlog table. Note: This isn't a practice so please read some of our blog posts that discuss extending MonoX functionality.
Let me know if you need anything else.
Regards