Welcome, Guest
Username: Password: Remember me

TOPIC: Collection and item view on the same page

Collection and item view on the same page 30 Nov 2016 17:15 #14773

  • vlemos
  • vlemos's Avatar
  • Online
  • Elite Member
  • Posts: 295
  • Thank you received: 41
  • Karma: 21
Hey cooks, was it here that someone was asking about displaying a collection and item view on the same page? Thx
The administrator has disabled public write access.

Collection and item view on the same page 30 Nov 2016 21:22 #14779

  • admin
  • admin's Avatar
  • Offline
  • Administrator
  • Chef
  • Posts: 3711
  • Thank you received: 987
  • Karma: 140
I think you can base your page on the list context because it contains more functionalities than the item view.
Then, just add in your template file the rendering of a item in a sub-template file.
The view class will load the required datas with a item model instanced for that.

These are only the baselines.
To render a HTML template, you can create a layout file (used with JLayout class). It permits to render a headless template file. So you can call the HTML anywhere.
I really like the layouts files. I think Cook will use them much more. (Agility)
layouts/
Coding is now a piece of cake
The administrator has disabled public write access.
The following user(s) said Thank You: vlemos
Time to create page: 0.064 seconds

Get Started