what if I want to just display one field at a time?[SOLVED]

Status
Not open for further replies.
Hi,


what if I want to just display one field at a time?

for example, I'm making a template inside a joomla template.
It's job will be to display the content from one field of that table without loading all the fields in that table.

I did not receive a reply in the regular forum, I should of just posted this in here.


-Roger
 
Re: what if I want to just display one field at a time?

Hi Roger

create a custom template for the table that only renders that one row
or
copy your table (which will make a copy of the elements) and unpublish all the fields that arent required

Cheers
Rob
 
Re: what if I want to just display one field at a time?

:D

sweet!, 1 problem,

The table template starts with the first record and shows only however many is defined in its table parameters in the back end.

This would work just fine on a small database in a small website. However I need the template to be able to actually pull one record from the database at a time, not just render one of them. If it was to pull all the data from the database just to render one record the site would be ... very slow.

I'm making a website project called Destination Fish for the magazine Destination Fish.
I wanted to make database for hundreds of countries and cities around the globe.

I was reading into the classes and the functions, what I need to pull off is finding where and how the data is being taken from the database so I can give that control to the template.

If it is not possible, let me know. I'll just create my own back end to front end application.

Thanks,

Roger
 
Re: what if I want to just display one field at a time?

Can't you just pre-filter the data by ID so only one record gets selected?

-- hugh
 
Re: what if I want to just display one field at a time?

fabrik doesnt pull in all the table data - it pulls in only the number of rows specified - either by the dafault "Records to show per page" option or from the table navigation
 
Re: what if I want to just display one field at a time?

Rob Clayburn said:
fabrik doesnt pull in all the table data - it pulls in only the number of rows specified - either by the dafault "Records to show per page" option or from the table navigation
Yes, I understand that.

and

Hugh Messenger said:
Can't you just pre-filter the data by ID so only one record gets selected?

-- hugh

I was hoping that was possible.
 
Re: what if I want to just display one field at a time?

Hi Roger

Yes, I understand that.
Youre question seem to me to imply that you didn't sorry 8)

I think you are worrying unnecessarily.

- Hundreds of records is not a large data set
- Lets say you leave your table to collect 10 records - it holds those 10 records in RAM and you only show one record - again this isn't a big hit on the server
- setting the ""Records to show per page" to 1 will even remove this issues as you will be querying the database for 1 record and showing one record

I was hoping that was possible.
yup it is - you can either set up a prefilter for the table, or use "&tablename___elementname[value]=x" in the url that calls the table
 
Re: what if I want to just display one field at a time? [SOLVED]

sweet!, I'll give it a shot right now

So, I tried it out. Maybe I'm not doing this right?
fresh install
I have joomla 1.0.13 latest stable
fabrik 1.04 _ latest svn as of 25 FEB 08
I made one table with multiple elements in a group called countries.
I made 2 fields in the table. One of the element names is name its label is Name.
I am using the default template for fabrik, but I am using a yooTheme joomla template ,it has mootools.

http://localhost/newDF-2008/index.php?option=com_fabrik&Itemid=7&tablename___elementname[name]=Brazil

Of the 2 fields in the table, one is 'name' and is equal to 'Brazil'
but when I execute that link, both fields in the table still show?

Is this a matter of syntax?

[after further testing]

I got it to work!!
the link that works is this:

http://localhost/newDF-2008/index.php?option=com_fabrik&Itemid=7&jos_fabrik_formdata_1___name[value]=Brazil

Cool Thanks!,
I get it now! ^^
 
Status
Not open for further replies.
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top