Building Web Page

A place for users and developers of the Xataface to discuss and receive support.

Building Web Page

Postby butchseaman » Thu Jan 28, 2010 2:56 pm

Is there some kind of documentation about how to build a web page using Xataface?
I mean putting the index and other pages in xataface/database and managing things through xataface.
Thanks
Butch
butchseaman
 
Posts: 21
Joined: Sat Jan 23, 2010 8:51 am

Re: Building Web Page

Postby shannah » Thu Jan 28, 2010 3:08 pm

I don't think I have created any specific documentation on this, but you might want to check out the webpage module.
http://weblite.ca/svn/dataface/modules/ ... readme.txt

I have been working on a new CMS that accomplishes a similar thing but is more refined and powerful, but this module should give you some good pointers.
shannah
 
Posts: 4457
Joined: Wed Dec 31, 1969 5:00 pm

Re: Building Web Page

Postby butchseaman » Fri Jan 29, 2010 10:39 am

I think I understand... but maybe do you have a demo of this module in operation. The portion I am wrestling with is point 2 in the installation:
2. Copy the n1_pages directory into your application's tables directory.

Thanks
Butch
butchseaman
 
Posts: 21
Joined: Sat Jan 23, 2010 8:51 am

Re: Building Web Page

Postby shannah » Fri Jan 29, 2010 10:42 am

Basically this module just includes a single table definition for a table named "n1_pages". It also includes the configuration directory for this table. This directory is named "n1_pages" after the table name, and like all table configuration directories, it goes inside the 'tables' directory of your application. It is just as if you created a table yourself for your application and set up the configuration for it in a fields.ini file etc....

-Steve
shannah
 
Posts: 4457
Joined: Wed Dec 31, 1969 5:00 pm

Re: Building Web Page

Postby butchseaman » Fri Jan 29, 2010 11:22 am

ok... maybe it the browsing portion I am having the problem with.

if my page is located at http://localhost/ipsg/test_page

how would that relate to

index.php?-table=n1_pages&-action=page&page_path=%%page_path%%
butchseaman
 
Posts: 21
Joined: Sat Jan 23, 2010 8:51 am

Re: Building Web Page

Postby shannah » Fri Jan 29, 2010 11:27 am

index.php?-table=n1_pages&-action=page&page_path=/ipsg/test_page
if your app was located a http://localhost/
or
index.php?-table=n1_pages&-action=page&page_path=/test_page
if your app was located at http://localhost/ipsg


You see the page_path parameter is just specifying a find on the page_path field of the n1_pages table. So it matches whatever you put in the "path" field of your record.

I would use this module as a learning tool only. Once you see how it's done (there really isn't much to it), it isn't hard to set up your own thing that fits into how you want your app to work. Essentially you just need an htmlarea field and a custom template. The rest is all book-keeping.
shannah
 
Posts: 4457
Joined: Wed Dec 31, 1969 5:00 pm

Re: Building Web Page

Postby butchseaman » Fri Jan 29, 2010 11:57 am

ok... well then i was navigating to the correct place...

this is the error

Fatal error: No template found for action 'page'.On line 48 of file F:\PortableApps\xampp\htdocs\xataface\actions\default.php in function printStackTrace()
On line 1114 of file F:\PortableApps\xampp\htdocs\xataface\Dataface\Application.php in function handle(array(array(page,page)))
On line 1594 of file F:\PortableApps\xampp\htdocs\xataface\Dataface\Application.php in function handleRequest()
On line 5 of file F:\PortableApps\xampp\htdocs\ipsg\index.php in function display()
in F:\PortableApps\xampp\htdocs\xataface\actions\default.php on line 48
butchseaman
 
Posts: 21
Joined: Sat Jan 23, 2010 8:51 am

Re: Building Web Page

Postby shannah » Fri Jan 29, 2010 12:02 pm

What URL produced that error?
shannah
 
Posts: 4457
Joined: Wed Dec 31, 1969 5:00 pm

Re: Building Web Page

Postby butchseaman » Fri Jan 29, 2010 12:13 pm

butchseaman
 
Posts: 21
Joined: Sat Jan 23, 2010 8:51 am

Re: Building Web Page

Postby shannah » Fri Jan 29, 2010 12:16 pm

The page action should be defined in the n1_pages directory. Did you add the n1_pages directory into the tables directory of your application?

(i.e. you should have tables/n1_pages/actions/page.php)
shannah
 
Posts: 4457
Joined: Wed Dec 31, 1969 5:00 pm

Re: Building Web Page

Postby butchseaman » Fri Jan 29, 2010 12:23 pm

ok... this is what I am not understanding for some reason...

I have:
tables > n1_pages > fields.ini

I am not understanding the syntax of what it would look like
(i.e. you should have tables/n1_pages/actions/page.php)

is this in a file called n1_pages or an entry into the ini and if so can you give me idea of what the syntax would be
butchseaman
 
Posts: 21
Joined: Sat Jan 23, 2010 8:51 am

Re: Building Web Page

Postby shannah » Fri Jan 29, 2010 12:44 pm

You need this entire directory.http://weblite.ca/svn/dataface/modules/ ... /n1_pages/
Not just the fields.ini file.

Copy this directory so you'll have:
tables/n1_pages/
in your application.

This directory includes the fields.ini file, actions, templates, and all the other stuff that is used.
shannah
 
Posts: 4457
Joined: Wed Dec 31, 1969 5:00 pm

Re: Building Web Page

Postby butchseaman » Fri Jan 29, 2010 1:25 pm

ok... I got them working.. thank you for your patience. I am not sure what i missed or how i missed it... but with out you sending the directory structure I don't think I would have ever figured this out.

Now just so I am clear... this same directory structure and content would be used for each page if I understand correctly... with the different names for the pages of course

Butch
butchseaman
 
Posts: 21
Joined: Sat Jan 23, 2010 8:51 am

Re: Building Web Page

Postby shannah » Fri Jan 29, 2010 1:46 pm

I'm not sure I understand the question. You can store unlimited webpages with this setup. Each webpage is a record of this table.

(Note that the .htaccess portion is very helpful for making the URLs look nice).

This module is a good sample for learning as it demonstrates such concepts as custom actions, templates, .htaccess (mod_rewrite), and delegate classes. If you understand how and why everything works in this, it will be quite easy to roll your own CMS that works exactly the way you like.
shannah
 
Posts: 4457
Joined: Wed Dec 31, 1969 5:00 pm

Re: Building Web Page

Postby butchseaman » Fri Jan 29, 2010 2:36 pm

Yes... I see what you are talking about. I think I just need to spend a little time working with this... but you did a great job once again...
butchseaman
 
Posts: 21
Joined: Sat Jan 23, 2010 8:51 am

Next

Return to Xataface Users

Who is online

Users browsing this forum: No registered users and 11 guests

cron
Powered by Dataface
© 2005-2007 Steve Hannah All rights reserved