MonoX support board

Start the conversation, ask questions and share tips and solutions with fellow developers.

Non-registered users can only browse through our support boards. Please register now if you want to post your questions. It takes a second and it is completely free. Alternatively, you can log in without registration using your credentials at major sites such as Google, Microsoft Live, OpenId, Facebook, LinkedIn or Yahoo.

Want to add a new functionality under blog section  (Closed) (Mono Support )

Viewed 14996 time(s), 6 post(s) 11/10/2011 10:14:51 AMby sudhir.mishra
sudhir-mishra

sudhir.mishra

11/10/2011 10:14:52 AM
HI,
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).

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.

3. On the right panel of this page I want another section where I will place a text box and button for my work.



This content has not been rated yet. 
15 Reputation 3 Total posts
sudhir-mishra

sudhir.mishra

11/10/2011 10:21:56 AM
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 ???

Please tell me.
This content has not been rated yet. 
15 Reputation 3 Total posts
khorvat

khorvat

11/10/2011 11:29:07 AM
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
This content has not been rated yet. 
15993 Reputation 2214 Total posts
sudhir-mishra

sudhir.mishra

11/10/2011 11:46:14 AM
On the rights where its previously showing all blogs in BLOG page.

I want to show only the favorite blogs. which user had make his/her favorite.

I have the source code. Please let me know how can I change the table name.



regds..
This content has not been rated yet. 
15 Reputation 3 Total posts
khorvat

khorvat

11/10/2011 11:56:22 AM
I'll provide you with a guidance soon, can you please use your priority support forum so we can provide you with a better support (You can find a link to the priority support forum in your upper right corner, if you can't find it let me know).

Thanks.
This content has not been rated yet. 
15993 Reputation 2214 Total posts
khorvat

khorvat

11/10/2011 4:25:33 PM
I'm closing this topic as we have moved the discussion to priority support forum where I'll provide you with source code etc.

Regards
This content has not been rated yet. 
15993 Reputation 2214 Total posts