Welcome Guest, Not a member yet? Register   Sign In
Pagination help!
#1

[eluser]Ivar89[/eluser]
So I have huge text and I want to show that in several pages, but the text is in one database row(website content).

I insert text using my own very thin cms, and the content of a page goes in only 1 database row, now I want the website to stay the same height, so I need multiple pages for one text to succeed. Now I checked pagination and It couts database rows...but its only one row.

Is there a way I can do this, while keeping the single database row?
#2

[eluser]Ivar89[/eluser]
Ofcourse it doesn't have to be pagination, I just don't know anything to pull thios off. I just need something that will make pages from a long text.
#4

[eluser]Ivar89[/eluser]
Helps a little yes, yet I don't see how I can make it work with those sorry haha.
#5

[eluser]Ivar89[/eluser]
Little more help pleaseSmile?? Need it done by tomorrow
#6

[eluser]InsiteFX[/eluser]
Did you look at the word_limiter() function!

Then use a read more anchor link if the want to read the rest of the page!
#7

[eluser]Ivar89[/eluser]
Yeah, I thought about that to but:
I call the cotent from database, then I do this:
Code:
<div id="&lt;?php echo $text ?&gt;">&lt;?php foreach ($pages AS $page):?&gt;
     &lt;?php echo $page->strPageTitle; ?&gt;
      &lt;?php echo $page->strContent; ?&gt;
      &lt;?php endforeach ?&gt;
      
     </div>

The text there is like 3 or 4 ages long, So I limit the word to let's say 100, I can make a read more, but can I say word limt from 100 to 200?... Thats the part i can't figure out.

Thanks for the help so far though Smile!!!
#8

[eluser]Aken[/eluser]
If you're just looking to maintain the same page style, why don't you use CSS to create a box on the page with its own scroll bar, kind of like an iframe? Should have nothing to do with CI or your DB.
#9

[eluser]Ivar89[/eluser]
Thought about that to, but that really looks ugly hahaTongue
doesn't fit in the design(which I did NOT make)

isn't there a easy way?Tongue

Code:
&lt;?php $page->$strContent ?&gt;

produces to much text, is there no easy to make multiple pages from the text I get
#10

[eluser]aquary[/eluser]
I don't think there will be something you could just "plug in and works like a charm"....

Maybe put a custom code in your content editor, like [PAGEBREAK], for marking the end of the current page. Then you could detect for those special code and treat the number of their appearance as a total_rows for pagination. However, you'll have to deal with how to show a good page. But atleast, with this way, you could control where you want to end a page, instead of relying on something autometically, which is unpredictable.

But again, really, the design is never be so much strict about height.... especially for pages with content that could be as long as the bible.




Theme © iAndrew 2016 - Forum software by © MyBB