{"issue":{"state":"open","created_at":"2011-11-28T16:52:25Z","updated_at":"2011-11-28T16:52:29Z","user":{"gravatar_id":"256406243346b9253f8610fb1d1e05f6","id":1215373,"url":"https://api.github.com/users/importer","avatar_url":"https://secure.gravatar.com/avatar/256406243346b9253f8610fb1d1e05f6?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","login":"importer"},"comments":3,"body":"Working on my TagNews I wrote code to break a news item in to multiple pages. When creating a news item, they enter something like \n\n![](break) where they want page breaks in the article text. (If you implement, please let me know what you would use as the separator and I will as well.) \n\nThe custom code in Module News is just below:\n\n```\n// Add an image\nif ($objArticles->addImage && is_file(TL_ROOT . '/' . $objArticles->singleSRC))\n{\n.\n.\n.\n}\n```\n\nis:\n\n```\n\nif(ereg('\n\n![](break)',$objTemplate->text))\n  {\n    $textBlock = split('\n\n![](break)',$objTemplate->text);\n    $page = $this->Input->get('page') ? $this->Input->get('page') : 1;\n    $objTemplate->text = $textBlock[$page-1];\n    // Add pagination menu\n    $objPagination = new Pagination(count($textBlock),  1);\n    $objTemplate->pagination  = $objPagination->generate(\"\\n  \");\n    if($page \n\n![](= 1)\n      $objTemplate->addImage = false;\n  }\n\n```\n\nPut there to turn off the addImage if on page 2+.\n\nIn the mod_tagged_full.tpl, \"<?php echo $this->pagination; ?>\" needs to be added.\n\nThen in the News Text field, set the description to something like:\n\n\"Please enter the news text. Enter )break! where you want to split pages.\"\n\nJust thought it would be a feature desired in the news.\n\n--- _Originally created by bumforaliving on February 2nd, 2009, at 10:47pm (ID 474)_","assignee":{"gravatar_id":"87d2e5aefadcb310f9155df28c2b3582","id":1192057,"url":"https://api.github.com/users/leofeyer","avatar_url":"https://secure.gravatar.com/avatar/87d2e5aefadcb310f9155df28c2b3582?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","login":"leofeyer"},"id":2369846,"number":474,"pull_request":{"patch_url":null,"html_url":null,"diff_url":null},"labels":[{"name":"Feature","color":"4183c4","url":"https://api.github.com/repos/contao/test/labels/Feature"},{"name":"news","color":"e6e6e6","url":"https://api.github.com/repos/contao/test/labels/news"}],"title":"Paging in individual news item","closed_at":null,"html_url":"https://github.com/contao/test/issues/474","url":"https://api.github.com/repos/contao/test/issues/474","milestone":null},"action":"created","comment":{"created_at":"2011-11-28T16:52:29Z","updated_at":"2011-11-28T16:52:29Z","user":{"gravatar_id":"256406243346b9253f8610fb1d1e05f6","id":1215373,"url":"https://api.github.com/users/importer","avatar_url":"https://secure.gravatar.com/avatar/256406243346b9253f8610fb1d1e05f6?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","login":"importer"},"body":"I respect that but I'm not clear on what you mean. Could you explain how it is affected? Not strong on search engine. =/\n\nAccepting there is some hit on search engines, since nothing will happen unless they enter \n\n![](break) in the news content, those concerned could avoid using it. No?\n\nThanks Leo.\n\n--- _Originally created by bumforaliving on February 7th, 2009, at 02:54am_","id":2901209,"url":"https://api.github.com/repos/contao/test/issues/comments/2901209"}}