Results 1 to 4 of 4

Thread: News: 'Read more' link only for for long news stories?

  1. #1
    User
    Join Date
    06-19-09.
    Posts
    106

    Default News: 'Read more' link only for for long news stories?

    Hello here in the new forum

    I'm looking to set up a news page where most news items are displayed in full, with image and formatting etc., and only those stories which are longer would have a "Read more" link.

    What's the simplst way to achieve this?
    Thanks

  2. #2
    User Toflar's Avatar
    Join Date
    06-19-09.
    Location
    Lyss, Switzerland
    Posts
    170

    Default Re: News: 'Read more' link only for for long news stories?

    Hi spirelli

    You've got different news modules.
    For example you've got one for the list of all entries and a news reader to display the whole news entry.
    Look at your news section in the backend. You'll find a textarea named 'teaser' which will be displayed in the list with a 'read more' link.

    Try out and let us know your achievements!
    Think learning by doing is the best way :D

    If you're completely lost, tell us what you tried and what exactly didn't work for you

    Go on! 8-)

    EDIT: Ah, I see...you're looking for a way to do this in the same module?? For example if the text is longer than 200 characters, you'd like to display the 'read more' and if not so, display the whole news?
    Regards

    Yanick - Contao core developer @terminal42 gmbh

  3. #3
    User
    Join Date
    06-19-09.
    Posts
    106

    Default Re: News: 'Read more' link only for for long news stories?

    Quote Originally Posted by Toflar
    EDIT: Ah, I see...you're looking for a way to do this in the same module?? For example if the text is longer than 200 characters, you'd like to display the 'read more' and if not so, display the whole news?
    Correct. I thought that, ideally, the editor could decide which stories would continue on the "News reader" page, and which ones are short enough to display in full (incl. formatting, image, enclosure etc). However, an automated way might be more feasible...

    Having though a little more, I guess I could come to a satisfactory result if the news teaser had the rich text editor. It seems to only be active for articles. I guess my request changes now to: How can I get the rich text editor for News?

    Many thanks.

  4. #4
    User Toflar's Avatar
    Join Date
    06-19-09.
    Location
    Lyss, Switzerland
    Posts
    170

    Default Re: News: 'Read more' link only for for long news stories?

    Okay, what I would do in this case is the following (sorry, gotta go soon and I can't try it right now).

    Use all possible news modules and add <?php echo $this->showTemplateVars(); ?> to your different news templates.
    This will show you all variables which are provided by the module you've chosen.

    Later, you merge different parts of the templates...
    Regards

    Yanick - Contao core developer @terminal42 gmbh

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •