Click here to register.
      
Sprechen Sie WebGUI? Parlez vous WebGUI? Se habla WebGUI? Spreekt u WebGUI?

Do you speak WebGUI? Please help us translate WebGUI into your language.



     Web Design, Templates, and Themes > Dataform Data List Templating

Dataform Data List Templating

User philadev
Date 4/8/2008 3:11 pm
Views 262
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 [
|
]
 
 

Re: encrypt login by patspam - Mon @ 06:45pm

Re: New default WebGUI templates by arjan - Mon @ 05:50pm

Re: Dropdown Menu by rogier - Mon @ 05:18pm

Re: encrypt login by koen - Mon @ 04:19pm

Re: New default WebGUI templates by JT - Mon @ 03:20pm

Re: New default WebGUI templates by rogier - Mon @ 03:10pm

Re: Prequery in SQL report doesn't work? by martink - Mon @ 10:58am

WebGUI 7.4/7.5 scheduling by JT - Mon @ 09:20am

Smoketest For nightly_2008-05-12 by Visitor - Mon @ 12:51am