Showing custom text from a list
-
Tuesday, March 06, 2012 1:59 PM
Hello
I have a collection of texts and I want to be able to select one and display it inside a webpart in my pages.
I am thinking of adding the texts as items inside a list and then using a Content Query Web Part (CQWP) to retrieve the one I need to show.
My questions follow:
1) Is this the best option for me or are there others I should consider?
2) In my first experiments I was able to show the text from the items but the contained html tags appeared as plain text (< b > instead of bold letters). How can I avoid this?
3) Do I always need to show the title of the retrieved item from CQWP or can I just show the content?
4) And finally, is there a way to "mask" the overly complex (for the novice user) configuration interface of CQWP and present a simplified version of it, like a drop down menu (so to speak), or will I have to create my own Web Part for this?
Thank you all in advance.
Kind Regards,
Konstantinos
All Replies
-
Tuesday, March 06, 2012 2:20 PM
Hi
create a list which will have the default Title columns ( which you will can use as title for your text
add a new column - a multiline text column, and enable it as richtext
Also you can add other columns as metadata which will be usesfull in later serach or classification....
What you have to do is to fill your list
To show the texts, you can using a xlslistviewwebpart ora dataformwebpart.
To avoid described issues ( step 2 )
insert in the code ( using for ex SHP Designer )
<xsl:value-of select="@your_COLUM" disable-output-escaping="yes"/>
Romeo Donca, Orange Romania (MCSE, MCTS, CCNA) Please Mark As Answer if my post solves your problem or Vote As Helpful if the post has been helpful for you.
- Marked As Answer by Pengyu Zhao Friday, March 16, 2012 2:11 AM
-
Thursday, March 22, 2012 11:15 AMI ended up going for a custom Web Part, but thanks for your comments.

