Kuler SQL pagination in base stack?

@jnorris235 - I’m doing that kind of thing with the existing Base Pro for a few tables. Inside of Kuler Base Pro, I have a two column stack (your example shows 3 would be needed). In the first column, I have several SQL Data fields, one on top of the other to get the layout I wanted. I’ve also created some Virtual fields in the database to layout things like your Item Description in bold, followed by the description inline. Here’s a quick example of one of the member tables I’m using with the Virtual and HTML styles (Submitted_Virtual and Submitted_HTML) in it.

CREATE TABLE `Member_Resource` (
  `id` smallint(5) unsigned NOT NULL AUTO_INCREMENT,
  `Submitted_By` varchar(64) DEFAULT NULL,
  `Submitted_Other` varchar(64) DEFAULT NULL,
  `Submitted_Virtual` varchar(64) GENERATED ALWAYS AS (if((`Submitted_By` = 'Other'),concat(`Submitted_Other`),concat(`Submitted_By`))) VIRTUAL NOT NULL,
  `Submitted_HTML` varchar(128) GENERATED ALWAYS AS (concat('<strong>Submitted By:</strong> ',`Submitted_Virtual`)) VIRTUAL NOT NULL,
...
  `DTModified` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`),
  KEY `Name` (`Submitted_By`,`Submitted_Other`,`Written_By`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=109 DEFAULT CHARSET=utf8

My sql abilities are a fraction of yours - but if I read correctly, my original problem which was what I was asking for (if possible) is still this:
I can get the layout with the Pro stack - but I need pagination because each search produces hundreds and hundreds of books from their database. The client wont allow me to limit the search more accurately (which is daft) - hence my two year plea for pagination in the Pro stack.
He says that this is not possible - fine, at last I know that!!
Haven’t meant to be a pain, just thought I was asking a simple question about changing layout!

I don’t think Gary said it wasn’t possible. I think it’s already possible with the existing stacks. Here are two links for you, the first one uses the existing SQL Base Table stack and is simpler than what you would like, but still has the same type of elements. The very first item in the left column is actually a hidden SQL Data stack called Name_Last. The first visible field is Name_Full, which contains the prefix, first, middle, last and suffix, but is terrible for sorting.

http://awainterfaithclergy.org/member/directory/

This next one is using the existing SQL Pro stack. They look nearly identical, but the Pro one lacks the pagination. Note this one doesn’t show up in the navigation menus since I didn’t use it due to the pagination issues.

http://awainterfaithclergy.org/member/member_pro/

I could certainly be wrong here, but I don’t think it’s the SQL you’re fighting, it’s the idea of putting multiple SQL Data Stacks in the same column and/or hiding them that you haven’t tried/considered. I’m happy to try and help out with this further and help get you where you want to be if you’d like.

I think he said the pro stack cannot be set up to use pagination (“You can’t add pagination to the base Div or the Pro Div stacks.”), whereas with my total lack of knowledge I assumed it was like a subroutine loop that could just be dropped in.
I certainly can’t get a sql query using LIMIT and OFFSET to work (my lack of sql knowledge perhaps).
We do seem to be both trying to do a very similar thing (displaying data in our own way rather than using a simple table listing), and you are quite right that I had not noticed that hiding columns could be an answer! It all stemmed from getting no replies to my pagination request for two years and has boiled up into not a little frustration. Can’t understand why I wasn’t understood about displaying differently, but that’s what happens with words.
Will go and play with hiding columns…

1 Like

Be sure to try putting multiple Kuler SQL Data Stacks in the same column of a Kuler SQL Base Table, as well. I think you might find yourself a tweak or three away from where you want to be and hopefully the new additions will get you the rest of the way. Here’s a photo of that. Again, that top one is Last Name, but hidden.

Yup. If the new stack allows a query (which is its point) then your solution is as near as I’m going to get - and…havent quite figured why you have hidden stacks like the last name one?

The hidden one is used since I wanted to allow sorting by last name, but only wanted to show the full name. Basically, because I was messing with the columns in the same way you are doing. So, on the webpage, it shows “Rev. Jack Abel, M.Div, MBA” as the first person listed. The full name with all of the Rev., Pastor, Rabbi, etc., wasn’t the right sort approach. Make sense?

@Gary What is the version number of the latest update? Is there anything I need to do to make sure I have the latest and greatest?

Thanks,

Keith

Got it MGS! Thank you

@Gary Excuse me for this silly question.

I have Kuler SQL set of stacks (1.6.4), but I can´t figure out how to get the Pro Table Stack.

I would appreciate any help

Hi,

Current version is 1.6.4 … updates are sent out automatically via the auto updater built in to the Stacks plugin.

@peppermint - The Pro Table stack has not yet been released. I was hoping for today or tomorrow but I’ve been suffering through some food poisoning and it has me beat to the socks.

Thanks Gary for your kind response. I hope your troubles are mild and you recover quickly.

So we now have the proTable, thank you Gary!
Hope you wont mind if I discuss ways of using it as we all play?

It doesn’t play with Foundation (can’t put column stacks inside the Table to display), or pick up Styles. But am using with with that theme.
So not sure how to change column widths in the proTable, as mine (2 columns) aren’t equal.
No problem, just learning. Or re-learning css.

Data is displayed vertically centred in each column as you’d expect, but because I stack my Data stacks, rather than using the normal table listing (19 bits of data to list, per item, so it would be too wide) I must find how to style that in the css inspector.
I’m sure it can all be done with css.

Main problem - can’t get pagination to work, which is all I wanted!!

Anyone else playing out there?

Anyone getting pagination working in the new ProTable?

Hi Jon -

@Gary had mentioned in a separate exchange that Foundry was the underlying reason I was unable to get pagination to work with the Pro Table. Are you using Foundry, as well? If not, what Theme are you using? It may be loading the JS table in the same manner as Foundry.

Hi Jon -

Sorry, I see you are using Foundation. I don’t know if that’s the same issue. Perhaps Gary can verify that.

Here is a demo of pagination working in the new Pro Table with the Foundry theme.
https://demos.kuler.solutions/FPT/

here is another page with Pagination working …

https://demos.kuler.solutions/KulerSQL/pro-table/

2 Likes

@MGS - I don’t know about the Foundation theme … I do not have a copy of that theme. I will have to check with @joeworkman to see if I can get a copy of it.

Hi @jnorris235,

Would you happen to be using the SEO helper stack on your Foundation page? If so, you will need to remove that stack from your page to get it to work. That stack, while good for most pages, will send the jQuery call to the bottom of the page and when that happens it creates a conflict with the pro table stack.

If you remove that stack it should fix things for you.

Please let me know.

Gary