Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1
  • 2

TOPIC: Fly?

Fly? 30 Apr 2012 22:47 #2190

  • geoffr
  • geoffr's Avatar
  • Offline
  • Senior Member
  • Posts: 68
  • Thank you received: 2
  • Karma: 0
Hi, I'm unclear on what a "Fly" is. Are you able to explain? Is it for backend and frontend?

Also, is there a way to put fields into columns in the page layouts?

thanks,
Geoff
The administrator has disabled public write access.

Re: Fly? 01 May 2012 23:05 #2198

  • geoffr
  • geoffr's Avatar
  • Offline
  • Senior Member
  • Posts: 68
  • Thank you received: 2
  • Karma: 0
I now understand that a 'fly" is simply a presentation of the data - is this correct? It is used mainly for the frontend view. I'm catching on! ;-)

Question: How do I create different views (fly sheets?) which depend on a value of one of the fields?

e.g. I am building a course, and depending on the value of the field, 'code', the page will be presented in a different layout, some fields not required. I will need about 10 different page layouts, depending on the code the user selects.

Is this possible?

Thanks again. The more I use this, the more amazed I am becoming at how good this is!

cheers,
Geoff
Last Edit: 01 May 2012 23:31 by geoffr. Reason: I figured it out somewhat...
The administrator has disabled public write access.

Re: Fly? 02 May 2012 04:49 #2207

  • VeCrea
  • VeCrea's Avatar
  • Offline
  • Platinum Member
  • Absolute JCook fan
  • Posts: 473
  • Thank you received: 100
  • Karma: 30
You can create as many layouts as you want, both in backend and frontend.
But I don't think it's possible to do exactly what you want without ajax or hacks in the code after you did download and install the component.
The administrator has disabled public write access.

Re: Fly? 02 May 2012 04:59 #2210

  • geoffr
  • geoffr's Avatar
  • Offline
  • Senior Member
  • Posts: 68
  • Thank you received: 2
  • Karma: 0
Yes, I expected to do some code tweaking once I have the core in place. However, is a "layout" and a "view" the same thing? - and if so, does that correspond to a "fly"?

thanks,
Geoff
The administrator has disabled public write access.

Re: Fly? 02 May 2012 07:59 #2214

  • admin
  • admin's Avatar
  • Offline
  • Administrator
  • Chef
  • Posts: 3711
  • Thank you received: 987
  • Karma: 140
If you place your code in the view file (view.html.php), you will need to overload the layout url var, witch is not the best.

I think the best is to load your fly depending of the var.
In your default ITEM template you have :
<?php echo $this->loadTemplate('fly'); ?>

replace with :
<?php echo $this->loadTemplate('fly_' . $myVar); ?>



To make it easy and to get automatically the fly names with Cook, you have to define it it the FLY BRICK alias (properties)



PS :
About FLY : I used this term to not confuse with VIEW wich is different.
Coding is now a piece of cake
Last Edit: 02 May 2012 08:01 by admin.
The administrator has disabled public write access.
The following user(s) said Thank You: geoffr

Re: Fly? 02 May 2012 09:27 #2216

  • geoffr
  • geoffr's Avatar
  • Offline
  • Senior Member
  • Posts: 68
  • Thank you received: 2
  • Karma: 0
Thanks a lot, I'll see how it goes!

Much appreciated,
Geoff
The administrator has disabled public write access.

Re: Fly? 30 May 2012 03:54 #2441

  • geoffr
  • geoffr's Avatar
  • Offline
  • Senior Member
  • Posts: 68
  • Thank you received: 2
  • Karma: 0
Sorry, I am unable to find this line. Are you able to be more specific?

I hope to be able to load a fly sheet with the data corresponding to lesson type, e.g. 'LESSONTYPE4' which will be the same alias name as the flysheet.

Some guidance is greatly appreciated!

regards,
Geoff
The administrator has disabled public write access.

Re: Fly? 30 May 2012 04:46 #2442

  • geoffr
  • geoffr's Avatar
  • Offline
  • Senior Member
  • Posts: 68
  • Thank you received: 2
  • Karma: 0
I had another watch of your video tutorial for creating the front end fly, and was able to get my record to display. I still don't understand the instructions above, but I'm thankful for the tutorial, and for the progress so far.

Is it possible to create a NEXT/PREVIOUS button? Our lessons will be broken down to SETS, each with 10 questions, so we want a user to be able to progress not only to the next question, but to the next SET. Is this something I can set up in COOK?

Thanks,
Geoff
Last Edit: 30 May 2012 04:47 by geoffr.
The administrator has disabled public write access.

Re: Fly? 30 May 2012 05:58 #2443

  • admin
  • admin's Avatar
  • Offline
  • Administrator
  • Chef
  • Posts: 3711
  • Thank you received: 987
  • Karma: 140
<?php echo $this->loadTemplate('fly'); ?>
Is for loading a template file (ie: item_fly.php). In the example, I only give an example to load differents layouts depending on a value (dynamic)


Previous / Next is for soon, in the V2.0

The idea with previous/next is that you scroll a set of datas that corresponds to a filtered and ordered query.
So, it depends how you filter and order the set (userState session vars).

But as I said, it is not available now.
Coding is now a piece of cake
The administrator has disabled public write access.

Re: Fly? 20 Aug 2012 01:43 #3211

  • geoffr
  • geoffr's Avatar
  • Offline
  • Senior Member
  • Posts: 68
  • Thank you received: 2
  • Karma: 0
In creating a fly sheet in Cook, is it possible to apply a filter to the data query for a specific flysheet?

thanks,
Geoff
The administrator has disabled public write access.

Re: Fly? 21 Aug 2012 08:21 #3221

  • admin
  • admin's Avatar
  • Offline
  • Administrator
  • Chef
  • Posts: 3711
  • Thank you received: 987
  • Karma: 140
Playing with filters will be amazingly simple in the V2.0

For the moment, you can create predefined query profiles in the model and call them in the VIEW.HTML.PHP file.

In this file, you can know wich fly you are about to show, so you can load the right predefined model.

But...
Filters do not apply to an item layout. Do you mean a particular item search not based on the ID ?
-> Do it in the predefined query profile.
Coding is now a piece of cake
The administrator has disabled public write access.

Re: Fly? 21 Aug 2012 10:12 #3227

  • geoffr
  • geoffr's Avatar
  • Offline
  • Senior Member
  • Posts: 68
  • Thank you received: 2
  • Karma: 0
Thanks -- Just to clarify, when you say, "Do it in the predefined query profile", do you mean in the code files once installed on our site.. or do you mean in Cook?

Thanks,
Geoff
The administrator has disabled public write access.

Re: Fly? 21 Aug 2012 10:19 #3228

  • admin
  • admin's Avatar
  • Offline
  • Administrator
  • Chef
  • Posts: 3711
  • Thank you received: 987
  • Karma: 140
Yes.

The predefined profiles are setted to limit the query in a proper way depending on the layout.

It is an ugly code in the present version.

I kept this concept proposed by Cook Self Service, in V2.0, but in a Very nice way, and easy to customize.

Really, if you can wait a little bit (2 weeks) before to code inside your model, will be much easier for you.

Models and controllers are totally revisited in V2.0 !!
Coding is now a piece of cake
The administrator has disabled public write access.

Re: Fly? 21 Aug 2012 10:26 #3230

  • geoffr
  • geoffr's Avatar
  • Offline
  • Senior Member
  • Posts: 68
  • Thank you received: 2
  • Karma: 0
That sounds great... I'll hold out as long as possible - thanks!

Geoff
The administrator has disabled public write access.

Re: Fly? 22 Aug 2012 03:31 #3250

  • geoffr
  • geoffr's Avatar
  • Offline
  • Senior Member
  • Posts: 68
  • Thank you received: 2
  • Karma: 0
I have been playing with the query in the predefined profiles - nearly there.. but can't see how to add an ORDER BY in the query. Is this something that can be done inside Cook, or does it also need to be scripted? 9Sorry for asking such a basic question... just having a very slow time working through this....)

Thanks again,
Geoff
The administrator has disabled public write access.
  • Page:
  • 1
  • 2
Time to create page: 0.088 seconds

Get Started