What's the "right" way to create a News list in CQ5.4?

Hey folks,
I'm a brand new CQ developer and, though I've done a lot of reading, I'm still in the dark on how to do a few things.
I'm currently working on a corporate website, and I need to build a News page. Each article contains a title and rich text (possibly including embedded images, videos, etc...), and the News page itself should display a paginated list of recent article summaries (with "read full article" links). I also need to show the two or three most recent article summaries on the site's front page, under a News heading.
I thought there'd be a pre-built component to cover this case, since most corporate sites include a News page of some sort, but I haven't found one. Am I missing it? I looked into the Blog page template, but I think that adapting that may be overkill.
I think that the right way to do this would be to build a News component with a Title and Rich Text field in the edit dialog. New articles could be created by dropping these components into the parsys of the News page. I could then create both a .html and a .summary view for the components and use a customized List component to display the summary list on the front page. Am I on the right track here, or am I overcomplicating it?
Thanks!
- Michael

Hi,
The "right" way of building any list-like component is to extend the existing List component.
That is referenced in this documentation page:
http://dev.day.com/docs/en/cq/current/wcm/default_components.html#List
You can find it under /libs/foundation/components/lists
To create, for example, a 'News List' component, just create a new component under your /apps/myproject/components, setting 'foundation/components/list' as sling:resourceSuperType ans add your custom script to display each news item. see also [1]
That way you canprovide more renderers to be used around your site(s)
[1] - http://dev.day.com/docs/en/cq/current/developing/components.html#Developing%20a%20new%20co mponent%20by%20adapting%20an%20existing%20%20%20%20%20component
Hope this helps,

Similar Messages

  • What's the easiest way to create a new VLAN and then move all existing devices to it?

    One of our locations was implemented using VLAN1 as the main (native) VLAN. My goal is to create a new sub-interface on the router and then move all the existing switches (all Layer 2) into the new VLAN, without disrupting the network (and remotely). I am trying to determine the best way to proceed. Thanks.

    I wanted to shed a little more light on the situation. The "new" VLAN has actually been in existence since the network was initially setup. The network runs VTP and the new VLAN already has an interface on the router and already shows up on all the switches when you do a "sh vlan" command. We have about 10 VLANs in all. In reality, I am simply trying to migrate about 8 switches from VLAN1 (which they never should have been on) to the new VLAN. I know that I need to create an interface for the new VLAN on each of the switches and then swap the management IP to that interface. If I could connectly directly into each switch via the console port, this would be a simple task. However, the switches are in extremely remote locations with special circumstances, thus I have no physical access to them. This fact has me a little reluctant to making the changes, as we can't afford any mistakes that would potentially cause network downtime. I am looking for some guidance on exactly the steps to take to achieve my goal. Let's call the new vlan, VLAN2. During testing, I logged into a local switch that was on VLAN1 (that's where it had it's management address). It did have VLAN2-VLAN10 as well, via VTP. I created an interface for VLAN3 on the switch and then accessed it via VLAN3 to swap the main management interface from VLAN1 to VLAN2. The changes took, but I couldn't access it via VLAN2. I am assuming this is because the router still has VLAN1 listed as the native vlan and the VLAN2 IP address is still assigned to VLAN1 on the router. What would be the best way for me to make the required changes on the 8 switches that need swapped, without losing remote access? It wouldn't hurt if the network went down for 5 minutes or less, but we can't have a big outage. Thanks.

  • What is the proper way to create a new line space int the output?

    I want to create a space in between each input so the output would look something like this,
    Name of item 1: lollipops
    Quantity of item 1: 10
    Price of item 1: .50
    Name of item 2: diet soda
    Quantity of item 2: 3
    Price of item 2: 1.25
    Instead of this:
    Name of item 1: lollipops
    Quantity of item 1: 10
    Price of item 1: .50
    Name of item 2: diet soda
    Quantity of item 2: 3
    Price of item 2: 1.25
    Here is my code:
    for (i = 1; i < 4; i++)
                   System.out.print( "Name of item " + i + ":");
                   name = keyboard.nextLine();
                   System.out.print( "Quantity of item " + i + ":");
                   quantity = keyboard.nextDouble();
                   keyboard.nextLine();
                   System.out.print( "price for item " + i + ":");
                   price = keyboard.nextDouble();
                   keyboard.nextLine();
              }I know i can use the an empty output statement but is there something that will make my code neater?
    Edited by: RandellK on Sep 27, 2009 6:23 PM

    Just use an empty println.
    It's a pretty common idiom and no messier than printing a newline.

  • Hi all! What is the best way to create the correct space for baseball jersey names and numbers? along with making sure they are the right size for large printing.

    What is the best way to create the correct space for baseball jersey names and numbers? along with making sure they are the right size for large printing.

    Buying more hard drive space is a very valid option, here.  Editing takes up lots of room, you should never discount the idea of adding more when you need it.
    Another possibility is exporting to MXF OP1a using the AVC-I codec.  It's not lossless, but it is Master quality.  Plus the file size is a LOT smaller, so it may suit your needs.

  • What is the best way to create CRUD datagrids

    What is the best way to create CRUD datagrids that tell CF
    components to update sql tables. I find that I'm having to vreate
    all these columns with custom properites and its a bit of a chore:
    <mx:DataGridColumn id = "NatWest" dataField="NatWest"
    headerText="NatWest" editable="false"
    wordWrap="true"
    textAlign="right"
    headerStyleName="centered"
    labelFunction="price_labelFuncNatWest"
    sortCompareFunction="price_sortCompareFunc">
    I don't really want to use any wizards as I want control over
    my code.

    Hi Saythj,
    When mentioning "a database schema from XML", do you mean the
    XML Schema Collections? If that is what you mean, when trying to import XML files of the same schema type, you may take the below approach.
    Create an XML Schema Collection basing on your complex XML, you can find
    many generating tools online to do that.
    Create a Table with the above created schema typed XML column as below.
    CREATE TABLE youTable( Col1 int, Col2 xml (yourXMLSchemaCollection))
    Load your XML files and try to insert the xml content into the table above from C# or some other approaches. The XMLs that can't pass the validation fail inserting into that table.
    If you have any question, feel free to let me know.
    Eric Zhang
    TechNet Community Support

  • Dw, css, and a template, what is the best way to create a 20 page website with a different header in each page?

    dw, css, and a template, what is the best way to create a 20
    page website with different header content on each page? i am
    trying to insert a specific image and background color for each
    header on every page. what is the easiest or best way to do this?
    thanks, bryan

    "mediastream13" <[email protected]> wrote in
    message
    news:f47bes$9om$[email protected]..
    > ok, murray, here is the site.
    http://www.helphotline.org
    > in I.E. 6 i can't see the background color behind the
    header images,
    I'm seeing a hot pink background (which is my browser default
    - so that I do
    remember to declare a background color). You need to add:
    body { background-color: white;} to your stylesheet, or into
    the imbedded
    styles on your page.
    In Firefox, the very top black section, #headertop is hidden
    behind the
    header image.
    > background of the date/time isn't stretching the full
    length of the
    > screen, and
    > the margins aren't working in the main content area. how
    can i put a
    > background
    > color behind the header images?
    I can see the header image stretching right across the page..
    so not sure
    what color is missing there.
    > is there anyway to download i.e. six on my computer if i
    already have
    > i.e.7? i
    > just want to be able to preview the site before i upload
    the changes. it
    > seems
    > everything works in i.e. 7.
    Yes, I used this and it works really well.
    http://tredosoft.com/Multiple_IE
    Nadia
    Adobe® Community Expert : Dreamweaver
    CSS Templates |Tutorials |SEO Articles
    http://www.DreamweaverResources.com
    ~ Customisation Service Available ~
    http://www.csstemplates.com.au

  • What is the best way to create a Flash site

    Hello Everyone,
    I am realtively new to flash. I created the splash page of
    our site in flash but 1st off it takes to long to load as it is.
    But I would like to create the entire site in Flash. What is the
    best way to create a Flash site, and are there tutorials out there
    or any really good books, resources, or online classes to learn
    Flash well. I understand the basic of flash and have created
    banners, and other flash materials.
    Can anyone help?

    For me, as a noob, It's all about creative problem solving.
    For lots of stuff, there's no right or wrong solution, but you have
    to figure things out on your own. I, too, have built sites from the
    ground up, and then rebuilt them even better. It's the only way to
    really learn it well. Books, online forums, help docs all sort of
    help, but it all comes down to how innovative you can be with
    integrating them all into a site that is completely yours.
    This might save you loads of headaches: avoid using scenes,
    unless you are doing only animation. Keep each of your 'pages' on
    their own keyframe, and use 'gotoAndStop' to navigate through them.
    This is perhaps the easiest way to create a website quickly.
    P

  • What's the best way to create basic scrolling up end credits

    What's the best way to create basic scrolling up end credits with FCE. I want create normal look after the film that has a gap between the working title and the name (center-aligned, two-column
    scrolls)
    In the FCE Manual there was a good way to to do it with an asterisk (*) between the the words, but problem occurs when I had an umlaut (ÄÖ) in the word. The asterisk becomes visible and as many umlauts in the working title so many letters missing from the beginning of the name. I'm from Finland and we have lots of umlauts. So is there any other way to do this with FCE.

    You can use Title Crawl in Boris to do this. You set it up like a word processor with a right aligned tab, a gap and then a left aligned tab. Double click in the ruler to create a tab stop. Double click it again to change its alignment. You use the tab key to move between the stops. It's kind of hard to explain, but if you play with it, I think you'll get it.
    There is also Boris documentation on the install disc which will explain it more fully.
    Message was edited by: Tom Wolsky

  • What is the right way to handle events?

    What is the right way to handle events? If I start doing stuff in the AWT event thread (particulaly things that create their own events) should I be starting a new thread?
    A link to a good book or reference source will do
    thanks in advance

    http://java.sun.com/docs/books/tutorial/uiswing/events/

  • What is the best way to create business documents in CRM

    Hi All,
    What is the best way to create business documents like contract, sales order, debit memo etc in CRM ? Unlike R3 we can't use our good old BDC with recording. Moreover for most of them although there are Business Object but no BAPI to creation so what is the way ? I found in SDN there are two MAGIC Function module CRMXIF_ORDER_SAVE. Do I need to that alawys ?
    Is it nees to via IDoc and cannot be done just by calling from ABAP program ? The input parameter of the FM is a complex deep structure.
    Please help.

    Ashim,
    Try looking at the program:
    CRM_TEST_ORDER_MAINTAIN
    I think that should help you figure out the parameters.
    Good luck,
    Stephen

  • What's the right way to delete an entire backup ?

    I've had two Macs doing wireless Time Machine backups to one Time Capsule.
    Question: I got rid of one Mac, and want to delete its backup entirely (but leave the other computer's backups untouched). What's the right way to do it?

    Bob Timmons wrote:
    Jespes, welcome to the discussions!
    Open your hard drive. Your Time Capsule icon should appear under the SHARED heading.
    Click on the Time Capsule and a folder will appear to the right.
    Double click the folder and you should see a xxxxxx.sparsebundle file for each computer that has been backing up.
    Click on the xxxxx.sparsebundle file that you want to delete to highlight it and then click the gear shaped icon just above. Select Move to Trash. (Do not drag the file to the Trash as this will not work).
    Be careful, as the file will be deleted instantly and you will not be able to retrieve it.
    many thanks!

  • What is the right way to move a directory to another drive?

    When I move a directory to another location using drag and drop in the Elements 11 Organizer folder tree most, if not all, of the images become unlinked. What is the right way to move a directory and have the image paths updated in the Organizer database? Thanks.

    Bazsl wrote:
    When I move a directory to another location using drag and drop in the Elements 11 Organizer folder tree most, if not all, of the images become unlinked. What is the right way to move a directory and have the image paths updated in the Organizer database? Thanks.
    That's something I just did successfully one hour ago...
    I suppose your are in the 'folder' view with full folder tree, not in the 'My folder' view which only shows the lower subfolder level recorded in the database.
    Do you try to move a folder with its subfolders ?

  • What's the right way to add a swipe handler to a DataGrid?

    H All:
    What’s the right way to add a swipe handler to a DataGrid?
    (Target = Android, AIR using Flash IDE)
    Adding a handler to the DataGrid works; but (as expected) it only works on  the datagrid itself. Like if you swipe on the background before rows are fully  added. Adding columns over the datagrid, prevents the datagrids’ swipe handler  from firing.
    Trying to add a swipe hander to the columns themselves, results in the  below error.
    //  Below code fails with
    //  1061: Call to a possibly undefined method addEventListener through a reference with static type
    //   fl.controls.dataGridClasses:DataGridColumn.  So ... DataGridColumn doesn’t support addEventListener...
    There must be a better way(?).
    Thanks
                import fl.controls.DataGrid;
                import fl.controls.dataGridClasses.DataGridColumn;
               // Works, but only on the grid itself; as when the rows do not  fill the space tor the datagrid.
                myDataGrid.addEventListener  (TransformGestureEvent.GESTURE_SWIPE, swipeGridHandler);
                var c1:DataGridColumn = new DataGridColumn("Notes"); 
                c1.width = 90;
                c1.cellRenderer = CenterAlignCell;
                c1.addEventListener (TransformGestureEvent.GESTURE_SWIPE,  swipeGridHandler);

    Adobe list of properties and methods:
    http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/mx/controls/dataGridCla sses/DataGridColumn.html

  • What is the right  way to display a table in Java web dynpro using a node.

    Hi experts,
      I am trying to show a node of cardinality 0...n as a table in an adobe form in Java web dynpro. But its not showing it properly. Can anybody please tell me what is the right way to display a table on adobe form using a node of cardinality 0...n or 1...n in Java Webdynpro.  In ABAP webdynpro, we can drag and drop a node of cardianlity 0...n or 1...n to  show as a table and it works fine. Is the same possible in Java webdynpro also. Please help.
    Thanks and Regards.
    Vaibhav Tiwari.

    Please refer to my post.. you will get the answer
    Dynamic Table -  same data repeating in all rows
    Special care should be taken in designing the context for table attribute.
    The attribute type singletone also plays a important role. I have this doubt from the beginning when you have reported this problem for the first time but finally you marked it as solved so i thought there might be some other issues but again when you reported that again i did some analysis.
    Now coming to final solution :
    For designing a table in adobe interactive form you have consider following
    You have to design the view context upto three level, I am explaining you the properties
    PDFDataSource (Parent Level1) - Cardinality 1:1 - Signetone -True - This is assigned to datasource
    TableList (Parent Level2) - Cardinality (1:1) - Signetone -True
    TableWrapper(Parent Level3) - Cardinality (0:n) - Signetone -True
    TableData (Parent Level4) - Cardinality (0:1) - Signetone - false (This is the main point)
    Then under TableData value node, you have to put all your table attributes.
    This Value Node name can be anything but hierarchy should be same as I have mentioned above.
    Please try out these steps and get back to me if you have any doubt.

  • What is the right way to connect the adapter to my macbook when charging?

    what is the right way to connect the adapter to my macbook when charging.
    is it connect the magsafe connector first before plugging the adapter to the outlet? or the way around? or both ways will do?
    what if i'm using a surge protection with a on/off button, can I just turn the surge protector extension on and off without disconnecting the magsafe connector and adapter plug from my laptop when i'm not using it?
    thank you very much

    If there is any arcing it may be because the adapter is dirty. It is best to plug in the wall wart then attach the magsafe to the MacBook. As GfulDedFan mentioned this reduces the chance of power surging the MacBook. I have done mine this way since he day I bought it and have never had an arc. I keep it clean to reduce the chance of this happening. The following will help in the care of your supply.
    Apple: Use and cleaning of MagSafe power connector

Maybe you are looking for

  • Outbound Pexr2002

    We have a lot of Outbound Interfaces from SAP which require the payment information ( REGUH REGUP PAYR, BSAK, BSEG details). Is there a way we can configure SAP so that every payment run ( f110 ) would create Outbound IDOCS for all the payment types

  • Attach document in the campaign.

    hi, i have implemented the SAP Notes 672599, the document is not getting automatically attached in the document tab when i transfered the target group to open channel. how to do it.. is there any function module through which i can update it manually

  • Bpm worklist hangs listtnig reassignment users

    bpm worklist hangs listtnig reassignment users , if number of users is more than 25 users! there is some exception with soa server and embeded ldap , but i don now were is it plesae help me

  • Problems with the print parameters of REUSE_ALV_GRID/LIST_DISPLAY

    Hello, I would like to put the printing parameter IS_PRINT of the REUSE_ALV_LIST_DISPLAY. I can fill the structure but it doesn't work. I've try the following cases: - get the default print parameters, change this, set the print parameter (GET / SET_

  • Why is my recovery drive almost full and how do i clean it.

    Also why is my hard drive almost full when i have very little on the computer?