Welcome Guest, Not a member yet? Register   Sign In
Creating Pages
#1

[eluser]Unknown[/eluser]
Firstly to pre-empt the usual vitriol:
I've searched the forum.
I've searched Google.
I've 'RTFM'.

Unfortunately none of them give me an answer I like so I'm hoping x100 that someone can enlighten me to a nice way of doing what I need.

Basically I want the ability to create pages in a 'system' I am creating. Its not a CMS but it does require the ability to add content in the form of pages. These pages would have fields like: "title", "meta keywords", "meta description", "body text", etc.

I could do this by having a controller like "pages" and the URL being like:

www.examples.com/pages/view/mycoolpage
www.examples.com/pages/view/myrubbishpage

Alas - I don't want to do that. It looks rubbish.

Nor do I want to faff with adding extensive patches to the codebase to handle something so simple (one solution I found on this forum).

So does anyone out there know of a nice, simple, clean way of doing this?

Many thanks, much love and a drink if we meet to those who help. Smile

A plague and a thousand deaths to those with smart-arse replies that do nothing more than serve your own ego.
#2

[eluser]Dam1an[/eluser]
Firstly, welcome to the forum Smile
Secondly, have you read the user guide, search the forums and Google? Tongue

Ok, now down to serious business!

In what way does this 'system' differ from the many CMSs based on CI (or even a non CI CMS)? Are they a;; just overkill for what you want?
If so, read on, else check out pyroCMS or the like

You would (obviously) need a controller such as pages, and various methods such as add, edit, view, delete etc, but here's the clever part
using URI routing, you could have
www.examples.com/mycoolpage map to the view function in the pages controller
www.examples.com/mycoolpage/edit would map to the edit function in the view controller

Am I going in the correct direction here, or wasting my time? Tongue
#3

[eluser]Unknown[/eluser]
You're on the right track! That sounds like what I need (not pyroCMS) the routing.

However, am I able to do that with the routing without having to define a new route for every page I create? So if I create a page called: "jammy" it can be viewed at www.example.com/jammy without me having to put anything more into the routing system?
#4

[eluser]Dam1an[/eluser]
Yeah you could do a catch all route... the problem with this, is you'd need to define routes for any non pages before this, although if everything (and I mean everything) is a page, then you don't even need to do that
#5

[eluser]John_Betong[/eluser]
 
Hi Ashiro,
 
Welcome to the forum I am sure you will find the answers you require to your solution.
 
I converted my joke site to CI about couple of years ago. Initially I used a database table to store each separate joke/record. The joke was retrieved using "joke/show/123" or "joke/view/123". This worked but is tacky. A CI post suggested utilising a dummy title followed by the record number. The benefits of this is that it is SEO friendly and it also gives an indication of what to expect from the link.
 
Later I used redirection form my /joke/view/ and joke/show/ and currently have links such as:
http://johns-jokes.com/joke/of_the_day/W...Road/1409/
 
>>> but it does require the ability to add content in the form of pages.
>>> These pages would have fields like: "title", "meta keywords", "meta description", "body text", etc.
I save HTML coding into a joke/record field type longtext, maybe not the best choice but it does work. Just remember to format using nl2br(...) before displaying your data.
 
 
 
#6

[eluser]Phil Sturgeon[/eluser]
PyroCMS can have pages such as http://example.com/pagename which is dynamically "routed" and the current codebase (not a tagged version yet) allows you to add meta data via the admin interface.

It may seem like overkill with so many modules but you can simply delete any you don't want. I ripped out almost all modules for my personal blog and it runs perfectly quick.

With TinyMCE added to the current codebase editing is easy and powerful too.




Theme © iAndrew 2016 - Forum software by © MyBB