Click here to register.
      
PBWG Banner


     Discuss > Web Design, Templates, and Themes

Dataform Data List Templating

User philadev
Date 4/8/2008 3:11 pm
Views 678
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: Config File Changes by pwrightson - Fri @ 04:07pm

Re: IRC Logs by koen - Fri @ 02:08pm

Re: IRC Logs by patspam - Fri @ 02:01pm

Re: IRC Logs by koen - Fri @ 01:42pm

Re: How do I find al my submitted RFE's? by bartjol - Fri @ 01:39pm

Re: IRC Logs by kristi - Fri @ 01:27pm

Re: LastModified question by perlDreamer - Fri @ 12:57pm

Re: How do I find al my submitted RFE's? by bartjol - Fri @ 12:11pm

How do I find al my submitted RFE's? by koen - Fri @ 11:23am

Re: IRC Logs by koen - Fri @ 11:20am

IRC Logs by martink - Fri @ 10:51am

Re: cleaning out the wiki by koen - Fri @ 10:44am

Re: shop in 7.5.21 by kristi - Fri @ 09:03am

shop in 7.5.21 by erikms - Fri @ 08:07am