⚠ In case you've missed it, we have migrated to our new website, with a brand new forum. For more details about the migration you can read our blog post for website migration. This is an archived forum. ⚠

  •     

profile picture

Custom views or detail page?



BayingHound

BayingHound
  • profile picture
  • Member

Posted 12 September 2014 - 14:32 PM

I am totally and utterly confused. I have been playing around with code grocerycrud for a while, but I really don't like the layout of the detail page (if that is even the right term). I guess what I mean is when you click on view on the table, I don't want to see it line by line, instead I would like to customize this layout. I am a newbe so please be nice. Code would be so helpful. 

 

I'd like to set it up in a table so it looks a little more orderly. Do I put the $row in a <TD></TD>? Sorry if this doesn't make sense. 


BayingHound

BayingHound
  • profile picture
  • Member

Posted 13 September 2014 - 14:06 PM

Anyone? If it helps clarify what I'm getting at, I just want to show both the form and record that1 isn't line by line. I want more control over how it works. I was looking at the theme views, but it is a little beyond my understanding. Is there a waY to setup a view with something like echo $row [something] ? Not sure how to implement it. If the answer is elsewhere on this forum, please point me in the direction. There don't seem to be enough tutorials out there.

Amit Shah

Amit Shah
  • profile picture
  • Member

Posted 14 September 2014 - 07:35 AM

Well BayingHound

What you have as a feature is available as a template that existed out of emergency .. on a generic stuff.. What you are looking for is a specialized solution for the same. And each view for you will be more specialized then generalized. Hence what i can suggest you is to create a custom view and unset the basic read button of crud and add your own action making a call to that new view (through the controller action) of yours..

Thats the simplest of the solution. Cuz you cannot generalize the vuew for every table you put up in the grid. If you can and want.. u can go and alter the same into the GC->Themes->WhicheverTheme->Views->view.php

 

that should surely do you the needfull.


BayingHound

BayingHound
  • profile picture
  • Member

Posted 14 September 2014 - 19:37 PM

Not 100% sure how to do that or if I am understanding you correctly. I know about calling a different view, just not entirely sure how to put that view together. Aren't the available views more dynamic? Sorry if I sound stupid, perhaps I am, I'm making an attempt to learn. I've done a tiny bit of programming but I was more of a front end person and not really dealing with back end. I know the basics. Thanks for responding.


Amit Shah

Amit Shah
  • profile picture
  • Member

Posted 15 September 2014 - 04:51 AM

sorry - technically there aint a way in GC to specify the different  /seperate views to be loaded dynamically - what u can do is create a seperate theme where u design the view as per your likings and set that theme. What simple was is disable the GC to generate the view link and set your own by add action on the same.

 

Thats a simple way of setting your own view.


BayingHound

BayingHound
  • profile picture
  • Member

Posted 22 September 2014 - 13:34 PM

Sorry for not responding sooner. I will try that, thank you. I truly appreciate it. I've learned a lot, just wish there were a few more tutorials out there specifically for GC.


Amit Shah

Amit Shah
  • profile picture
  • Member

Posted 22 September 2014 - 18:17 PM

well i understand you sire..

but what base role of GC was all about to provide a wrapper library that would generate the CRUD functionality around a given table. The best part happened was the ability to configure things that opened up quite a number of possibilities. Yes a few set of tutorials if made available will be a good option. I would love to build stuff around it ... like a video based cookbook explaining the possibilities / architectural solutions that can go through with GC .. but unfortunately the limiting factor for me currently is time. But as and how i get time.. i will try my best to provide the stuff.

 

Well hope you bare with my english as in pronunciation .. might not be world class .. as i am a solutions provider .. then a narrator / lecturer.

 

Till then.. how ever possible, will try provide solution over the forum.


BayingHound

BayingHound
  • profile picture
  • Member

Posted 23 September 2014 - 15:34 PM

I was showing a few people what I have done already and their only complaint was that the output was hard to read because one had to scroll down. If the output could be shown in multiple columns, they'd be happy, but I have no idea how to do it. Like I said, I'm a beginner. I'll attempt to illustrate what I am talking about. When clicking on view for example. I want to do the same for the form views, just so everything isn't line by line. It's a tiny bit frustrating not being able to figure this out and with no guide or code examples, its almost impossible for me. 

 

Company Corporate Industries, Inc
123 Some Avenue
Rockville, Maryland 20850

 

Contact Fred Smith Phone 301-222-2222 E-Mail fred@email.com


BayingHound

BayingHound
  • profile picture
  • Member

Posted 23 September 2014 - 16:03 PM

Would I even use GC for this?


Amit Shah

Amit Shah
  • profile picture
  • Member

Posted 23 September 2014 - 18:35 PM

well sir frankly speaking, things can be achieved as desired (may not be 100% but close to quite a bit). What layout you are looking at is a question .... and how it is possible .. 1 may only comment post he / she have idea as on what is the requirement.

 

I agree and understand your point of concern but if in case the view layout workaround seems to be tough to manage, it will be easier to go with the custom view layout and instead of using GC's in built view functionality, u can do an add action setting your own view for the same.

 

Happy to help

 

Happy GCing :)