Portal Engine Questions on portal engine and web parts.
Version 7.x > Portal Engine > How can I design this Challenging web part? View modes: 
User avatar
Certified Developer 12
Certified Developer 12
chetan2309-gmail - 8/5/2013 10:28:21 AM
   
How can I design this Challenging web part?
Hi,

I have to design a tabular glossary section. The tabs will have indexes like A|B|C|D....

On clicking of A it must show all definitions starting from A..so on and so forth.

- On page load it must show random alphabet glossary.
- It must be able to interact with other web parts. For example, if I select H from other web part as a value of drop down, it must be able to show glossary for alphabet "H".

- Best if this can be achieved without going to .NET code

User avatar
Member
Member
egarrison-wte - 8/5/2013 2:04:23 PM
   
RE:How can I design this Challenging web part?
Depends if they are Tree items or in a custom table. If in a custom table, you could very easily use custom SQL query and do a where Name like 'A%' and pass your character on the URL string or encode if you have extensionless.

If you are tree nodes, you could define 26 folders A, B, C. Then have your definitions doc types show up under the right character. Your A | B | C list would simply link to: /glossary/A
Then you have a repeater to show all your A's. I would but the Repeater and template work at the /glossary/ level and have my repeater display "./%"

User avatar
Certified Developer 12
Certified Developer 12
chetan2309-gmail - 8/6/2013 1:36:18 AM
   
RE:How can I design this Challenging web part?
Do I need to create 26 doc types to cater this need or can I it be done using single doc type?

I need to show something like this

| A | B | C | D | E |... Glossary alphabets appear as tabs...

By default it must show data of any random alphabet on page reload

| A | B | C | D | E | => Assuming A is selected

Alpine alphonso
Andy adelaide
Amazing ......


Now if I click on B it must similarly show data for B

Thanks

User avatar
Member
Member
Swainy - 8/6/2013 3:20:08 AM
   
RE:How can I design this Challenging web part?
Hi Chetan,

You just need one document type and call it glossary item or something like that.

You will need to write your own logic to get a random letter of the alphabet on load and display those items. When you click on a letter (and on first load once you have the random letter) you need to retrieve all of your glossary item documents with a where condition of 'DocumentName LIKE '{LETTER HERE}%' and then rebind the repeater.

Thanks,

Matt

User avatar
Certified Developer 12
Certified Developer 12
chetan2309-gmail - 8/6/2013 3:29:16 AM
   
RE:How can I design this Challenging web part?
How can I pass the random Letter from jquery/javascript to repeater?

Can this be done without using .NET code?

I would appreciate if you can point me to some example


Thanks,
Chetan

User avatar
Member
Member
Swainy - 8/6/2013 4:50:07 AM
   
RE:How can I design this Challenging web part?
Hi Chetan,

Not really no. You can do this by calling the Kentico web service class from javascript and then getting the data back and using JQuery but you will still need to use .NET to create the class/method to return the dataset and this is really over complicating the situation.

In .NET you just need to create a link click event and pass in the link letter you have clicked into the repeater using rpt.WhereCondition =

Thanks,

Matt

User avatar
Kentico Support
Kentico Support
kentico_zdenekc - 8/8/2013 9:42:35 AM
   
RE:How can I design this Challenging web part?
Hi,

Thanks for your inputs and advices, Matt!

Zdenek