![]() |
Dvide article for part. - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23) +--- Thread: Dvide article for part. (/showthread.php?tid=3860) |
Dvide article for part. - El Forum - 10-25-2007 [eluser]jedre[/eluser] Hello, I have a question, how can I divide long article for smaller part (pages). Is it easy way to resolve this problem by use CI? Sorry for ma English ![]() Dvide article for part. - El Forum - 10-25-2007 [eluser]schnoodles[/eluser] You could always jsut truncate the text to a certain amount of chars. Have a look in the Text Helper for some nifty functions. You might also want to look into pagination to create several pages with navigation. Dvide article for part. - El Forum - 10-26-2007 [eluser]jedre[/eluser] [quote author="schnoodles" date="1193372192"]You might also want to look into pagination to create several pages with navigation.[/quote] Yea! ..but how? In article I have: title, author, write_date, content. Content is a lot of words. How divide it for few pages using pagination. I don't have idea. Dvide article for part. - El Forum - 10-26-2007 [eluser]xwero[/eluser] using Code: function wordcount($str) { Code: $words = wordcount($row->content); Code: <div class="articlecontent"> update : code mistake Dvide article for part. - El Forum - 10-26-2007 [eluser]xwero[/eluser] The code i displayed is if the pageparts are shown and hidden using javascript that way you can easily switch between showing the whole article and the cut up version. |