|
Member
|
tabish.friend-gmail
-
1/14/2010 5:46:25 AM
Load WebPart Or Widget By ID
hi
i want to show selected Widget in Pop up page (newly .aspx page) by providing its id in query string . Any body can help me in this .....
Bye
|
|
|
|
Member
|
tabish.friend-gmail
-
1/14/2010 9:07:35 AM
RE:Load WebPart Or Widget By ID
Hi
thanks for reply.
Actually I want to add new page in VS 2008 (.aspx for e.g WebPartDetail.aspx) and then I want to use it in displaying particular web part by query string parameter.
I want to use only its control not page . So which controls are necessary to drop on new page. Whats the procedure plz...
|
|
|
Kentico Developer
|
kentico_helenag
-
1/14/2010 9:33:11 AM
RE:Load WebPart Or Widget By ID
Hi, if you are using ASPX templates you may not use the widgets. Otherwise, the approach may be the same as mentioned. You place the web parts (controls) on the page template and set up the visibility of controls according the query string in the code behind of page. For example: if (ValidationHelper.GetString(Request.QueryString["ReturnURL"], "") == controlID.ID) controlID.Visible = true; (Visible property should be false for all controls by default.) More information about developing ASPX templates is here: http://devnet.kentico.com/docs/devguide/creating_a_new_aspx_page_template.htmBest regards, Helena Grulichova
|
|
|
Member
|
tabish.friend-gmail
-
1/14/2010 10:56:16 PM
RE:Load WebPart Or Widget By ID
Hi
I have created new Aspx page template . Now I have to add all webparts on this template ....?
and then i have to set only its visible property true according to my requirements ..?
Thanks
Tabish Matin
|
|
|
Member
|
tabish.friend-gmail
-
1/14/2010 11:08:03 PM
RE:Load WebPart Or Widget By ID
One more thing . i have created template just like example two table template
|
|
|
Member
|
tabish.friend-gmail
-
1/14/2010 11:59:36 PM
RE:Load WebPart Or Widget By ID
Thanks For your help . Now i am understand how to show one webpart at a time.
Now the only problem is that . In my newly created template, what i have to add that will show me the option of adding webpart in CMS Desk .
Thanks
|
|
|
Member
|
tabish.friend-gmail
-
1/15/2010 1:32:46 AM
RE:Load WebPart Or Widget By ID
New problem is that if I am selecting Article List then it shows empty
|
|
|
Member
|
Mujji
-
1/17/2010 11:20:57 PM
RE:Load WebPart Or Widget By ID
HI Tabish.
i want to do the same thing by just adding a particular control. Can you please share just this control logic with me... I'll be very thankful.
thanks Mujeeb.
|
|
|
Member
|
tabish.friend-gmail
-
1/18/2010 1:25:53 AM
RE:Load WebPart Or Widget By ID
Hi
According to Helena you have to add all webparts on a page and then set its visibility property according to your need.
Thanks Tabish Matin
|
|
|
Member
|
Mujji
-
1/18/2010 1:33:58 AM
RE:Load WebPart Or Widget By ID
Thx for the reply Tabish.
Ok i understand. I'll add my custom made control tags on the page. But how can i add the tags for the built-in webparts in CMS like Clock, Article, National Geo..
Do you have any idea?
Thx, Mujeeb.
|
|
|
Member
|
tabish.friend-gmail
-
1/18/2010 1:43:30 AM
RE:Load WebPart Or Widget By ID
No brother
I am also trying to do same thing.
main problem is that . when i try to load article list control it shows empty . no data loaded .
Kindly also share your solution , when you will done
Thanks Tabish Matin
|
|
|
|
Member
|
tabish.friend-gmail
-
1/18/2010 7:49:04 AM
RE:Load WebPart Or Widget By ID
HI
Thank you very much for yours precious help, now I can load data in article list and others.
Another problem is that when i am assigning value to control statictext.ascx
statictext1.Text ="some text"
it will show script .
If i direct copy that script to html page then it will show the webpart
Thanks
Tabish Matin
|
|
|
Member
|
Mujji
-
1/18/2010 1:05:32 AM
RE:Load WebPart Or Widget By ID
Hi helena.
I'm little confused here.
How can i add all the widgets on the Page? and the question is why do i add all the controls. Can't i just use the id or name to get control on runtime?
I created the aspx templete as you mentioned above.
Kindly can you tell me please, what i do to call any widget on page by passing a query string.
Thx, Mujeeb.
|
|
|
Member
|
Mujji
-
1/18/2010 1:47:46 AM
RE:Load WebPart Or Widget By ID
Help us out here Helena.
We want to add the built-in CMS widgets like Clock, Articles, National Geo.... into our webpage. How can we accomplish that?
Thx, Mujeeb.
|
|
|
Kentico Developer
|
kentico_helenag
-
1/18/2010 7:12:38 AM
RE:Load WebPart Or Widget By ID
Hello Mujeeb,
First of all, the widgets do not work with ASPX templates only with Portal engine. You say you use the ASPX templates so you may not use the widgets.
The widgets neither web parts cannot be called by ID from query string directly. The ID is related to the concrete instance of control. The web parts are controls. (Widgets are web parts with limited properties.)
In every way you need to create the instances of controls - either create them dynamically or have all of them directly in the code and set their visibility. If the control is invisible it does not appear in rendered HTML code. I think the approach with visibility is more clear.
Best regards, Helena Grulichova
|
|