Register Members List Search Today's Posts Mark Forums Read

Reply
 
Thread Tools
  #1  
Old 03 Mar 2013, 22:30
thezman thezman is offline
 
Join Date: Dec 2005
Data Grid in Custom Page

I have created a customer page that works just fine. I used this process to create the custom page. I can add some html to the template and it works like a charm.

What I need to do is add some PHP code to display a data grid. I have a data grid class that I can use in html pages to fetch and display data in a fancy grid control. Can I do this through the template system? I only want authenticated users to see the page and the data.

Any help is appreciated.
Reply With Quote
  #2  
Old 03 Mar 2013, 22:38
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Real name: Lynne
If you have php code to use, then it needs to be put in the php page. The templates only use html.
__________________
Former vBulletin.org Staff Member

Try a search before posting for help. Many users won't, and don't, help if the question has been answered several times before.
W3Schools -
Online vBulletin Manual
If I post some CSS and don't say where it goes, put it in the additional.css template.
I will NOT help via PM (you will be directed to post in the forums for help.)
Reply With Quote
  #3  
Old 03 Mar 2013, 22:54
thezman thezman is offline
 
Join Date: Dec 2005
Hmmmm.... I thought that was the case and out my code after $pagetitle = 'Grid Test'; and before $templater = vB_Template::create('GridTest'); with 'GridTest' being the name of my file and template. I get a blank page that lacks all the headers and footers from vbulletin.

When should I put my code?

--------------- Added 03 Mar 2013 at 23:09 ---------------

OK, I have the grid rendering, but the navbar and vbulletin headers are rendering below the grid. That means I'm putting my customer code in correctly, but not in the right place.
Reply With Quote
  #4  
Old 04 Mar 2013, 03:10
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Real name: Lynne
I can't really help without seeing your code. But, I can tell you that you cannot use echo statements. You need to assign your output to a variable and output that variable into the template.
__________________
Former vBulletin.org Staff Member

Try a search before posting for help. Many users won't, and don't, help if the question has been answered several times before.
W3Schools -
Online vBulletin Manual
If I post some CSS and don't say where it goes, put it in the additional.css template.
I will NOT help via PM (you will be directed to post in the forums for help.)
Reply With Quote
  #5  
Old 04 Mar 2013, 15:04
thezman thezman is offline
 
Join Date: Dec 2005
Originally Posted by Lynne View Post
I can't really help without seeing your code. But, I can tell you that you cannot use echo statements. You need to assign your output to a variable and output that variable into the template.
I suspected that was the case. I saw an article here on assigning a template to a variable to use in another template.
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


New To Site? Need Help?

All times are GMT. The time now is 22:50.

Layout Options | Width: Wide Color: