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 672
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: WRE upgrade 0.8.3 to 0.8.4 issue by koen - Thu @ 02:18pm

Re: "No Upgrade Necessary" by pvanthony - Thu @ 12:41pm

Re: WRE upgrade 0.8.3 to 0.8.4 issue by jmack - Thu @ 12:37pm

Installed WebGUI on SuSE 10.1 64bit by crythias - Thu @ 09:20am

Re: Question to Spectre by JT - Thu @ 06:40am

Question to Spectre by bepo - Thu @ 06:29am

Re: Re-design of "Get Add Ons" section by Chirifischio - Thu @ 05:45am

Re: "No Upgrade Necessary" by erikms - Thu @ 01:48am

Smoketest For nightly_2008-08-28 by Visitor - Thu @ 01:45am

Re: Can a WebGUI navigation generate li's of different sizes? by knowmad - Wed @ 10:11pm

Re: WRE upgrade 0.8.3 to 0.8.4 issue by pvanthony - Wed @ 09:07pm

Re: New default WebGUI templates by rogier - Wed @ 09:18am

YAHOO.util.Easing by lrobinson - Wed @ 05:07am