Click here to register.
      
irc://irc.freenode.net#webgui

iPhoneGuy: WebGUI is a pile of crap.
rizen: If WebGUI is such a pile of crap, why do you use it?
iPhoneGuy: Because it's the best pile of crap out there.

If this is what people who hate us are saying, imagine what people who love us will say. Come join us on IRC.


     Discuss > Web Design, Templates, and Themes

Dataform Data List Templating

User philadev
Date 4/8/2008 3:11 pm
Views 503
Rating 0    Rate [
|
]
Previous · Next
User Message
philadev

Hey, I hope someone can give me some insight.

Long Explanation ----------------------------------------

I'm working on altering the data list template for the dataform so that it checks to see what type of data it is and then attaches a specific class.

For instance: If I have a DataForm with 3 tabs and 8 fields for each tab, some date fields, others text areas and some check boxes the default template for the data list is going to be a mess.

In that scenario the table gives equal weight to all cells so that I have 24 equally divided columns regardless of content.

What i want is too check to see if this field is a time stamp or a textarea and then give it the appropriate class so that my textarea data gets more width than say my yes/no checkbox input.

Two questions ----------------------------------------

1) I see this in the help but can't seem to make proper use of it. Can anyone instruct me?:

record_data_type The data type associated with this field.
2) I've had discussions about templating on this board before and I feel like there have been allusions to a 1-to-1 correlation between template loops and database fields. Can any one offer any help on decoding the relationship between template loops and database fields?
If anyone can give me a good start I'll do my best to get it into the wiki.



--- (Edited on 4/8/2008 3:11 pm [GMT-0500] by philadev) ---



Back to Top
Rate [
|
]
 
 
philadev

Well, to answer my own Part1 question:

I was using the record_data_type incorrectly and quite optimistically like this and in other ridiculous ways:

<tmpl_if record_data_type.date>do this</tmpl_if> 

And finally got it right using as a variable like this to declare a class:

<a href="#" class="<tmpl_var record_data_type>"></a>

Part2 still stands.

 

--- (Edited on 4/9/2008 2:59 pm [GMT-0500] by philadev) ---



Back to Top
Rate [
|
]
 
 
colink

The template variables are all explained in WebGUI's online help.

Just append this to any WebGUI site URL:

?op=viewHelp;hid=data%20form%20list%20template;namespace=Asset_DataForm

If it's unclear, or you want more info, let's update it there.

--- (Edited on 5/9/2008 11:58 am [GMT-0500] by colink) ---



Back to Top
Rate [
|
]
 
 

Smoketest For nightly_2008-07-05 by Visitor - Sat @ 01:46am

Smoketest For nightly_2008-07-04 by Visitor - Fri @ 01:37am

Re: News Addon? by knowmad - Thu @ 06:04pm

Re: News Addon? by bepo - Thu @ 08:54am

Re: News Addon? by bepo - Thu @ 03:35am

Smoketest For nightly_2008-07-03 by Visitor - Thu @ 01:37am

Thingy Reporting (pt 2) by knowmad - Wed @ 05:37pm

Re: News Addon? by knowmad - Wed @ 05:12pm

spell checker and tinymce by elnino - Wed @ 04:50pm

Re: WebGUI works on perl 5.10 by knowmad - Wed @ 04:41pm

Re: how the cost installing WebGUI ?? by baylink - Wed @ 12:19pm