[SOLVED] Custom Page to View Records

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

[SOLVED] Custom Page to View Records

Postby casanovax7 » Thu Feb 28, 2013 9:39 pm

I am trying to figure out the best way to create a completely custom view of a record. Essentially, I want to be able to provide a view that I can completely build around my table, with no menus or browse or list options (just the data, and I will style it one field at a time). I do want to be able to use the valuelists that are already being utilized (otherwise those fields won't be understood at all). My thought as to how a user would access each record would be that I would give them a list of URLs like mydomain.com/xata/index.php?-table=mytable&id=1; then it would take them straight to the record. The reason I am trying to do this is that I have users helping me collect and fix data, and then I have users that I want to only be able to see individual records (and in an easy, clean format).

I am sorry if this seems like a basic question to anybody, I'm just completely turned around with the templates and am not really sure where to go with this. Any guidance would be appreciated. Thanks so much...
Last edited by casanovax7 on Fri Mar 01, 2013 8:58 am, edited 1 time in total.
Posts: 20
Joined: Wed Sep 05, 2012 3:36 pm

Re: Custom Page to View Records

Postby casanovax7 » Fri Mar 01, 2013 8:58 am

I think the question I posed is actually something that strips down the functionality so much that it's not even worth doing with Xataface. Instead, I've decided to simply code up a simple PHP page that reads the query string of the url, and then uses it in a query to build out a page based on the data received from the query. For the valuelists, it was easy enough to create a couple arrays and then use str_replace to interpret that data.

I'm marking this as solved because I think this is easily a better solution than trying to get rid of Xataface functionality. I very much doubt other users here (who probably have a much stronger coding background than I) need to know anything about the coding for this other page, but if someone finds this and wants some sample code, shoot me a message.

Thanks, and sorry for the bother in the forums!
Posts: 20
Joined: Wed Sep 05, 2012 3:36 pm

Re: [SOLVED] Custom Page to View Records

Postby shannah » Sat Mar 02, 2013 1:34 pm

Yes. Right tool for right job. That said, Xataface allows you to build custom actions which effectively would allow you to use your own custom PHP the same as you would externally - except that it would give you access to all of the xataface API (valuelists, template, etc...). There is documentation for this in the wiki and the getting started guide.
Steve Hannah
@shannah78 (on twitter)
sjhannah.com blog
Posts: 4457
Joined: Wed Dec 31, 1969 5:00 pm

Return to Xataface Users

Who is online

Users browsing this forum: No registered users and 2 guests

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