How to Display my custom list items in Content Editor or Content Query Webpart?

In this Webpart how to make data as "scroll= up"? for Eg: News Scrolling in Home Page.aspx.

If any one of the news is clicked it should show corresponding file in that list.

How to achieve this ????


I made a similar news feed few years back, and I can tell you the process I followed -

There's one list where admin or some special group puts news in a specific interval, I kept that list in tact. But I created one seperate html file, in that file I created the scrolling part, that's very easy I am not going to describe that part here, still if you need some simple quick reference

<marquee id="mqScrolling" behavior="scroll" direction="up">upward scrolling text</marquee>

Now to add items inside the marquee, I used ajax to fetch data from the list with SharePoint list.asmx web service, and add each item inside marquee with jQuery/JavaScript in a specific format, so roughly the code would be (please consider this as pseudocode not actual code)-

$(collectionReceivedByAjaxResponse).each(function(i, e){
  $('#mqScrolling').append('<a href='http://site/Lists/listname/DispForm.aspx?ID="+extract_ID_from_e+"'>"+extract_text_from_e+"</a>');

add some style as you wish and it works like a charm, please let me know if you face any issue with ajax call part

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.