Share » Forums » Developer » different designs for on node/object

different designs for on node/object

different designs for on node/object

Friday 29 July 2005 1:55:16 am - 12 replies

Author Message

David Eriksson

Friday 29 July 2005 2:16:30 am

Perhaps you could create your own templates, similar to the full/plain/line ones? Then you can just use node_view_gui to display them.

/David

gregor de Lijzer

Friday 29 July 2005 2:36:15 am

i already defined a template named patient_full_lab.tpl which shows the patients data and only his lab results. But how does the link look like to show the patient using this template. Do i have to define something in the override.ini?

Eivind Marienborg

Friday 29 July 2005 4:42:20 am

Not sure if I understand you correctly, but I'll give it a try :)

If you want to show the lab result/x-ray/etc, and nothing else on the page (none of the menus, headers, footers etc you usually have), then you should override the pagelayout.tpl.

If you for example need this view on lab result, EKGs and x-rays, you could make a pagelayout that only displays the {$module_result.content}, and make your own view to override the full view on these items. Overriding the pagelayout.tpl on the relevant classes shouldn't be any problem.

My 2 cents in, hope you succeed in making what you want :)

gregor de Lijzer

Friday 29 July 2005 6:19:04 am

thanks!
But i don't want a completly new pagelayout. Everything remains the same(header, left menu,...).
the only thing changes, is the view in the main area. almost the node remains the same. but one template should show the patient info with the lab results, another template shows the patient info with the ECGs,...

greg

Luc Chase

Friday 29 July 2005 6:27:01 am

Gregor,
in addition to using different style-sheets to control what is visible (and its layout) according to the display device (mobile, print, audio, etc.), you can set the layout which ezp selects by inserting layout/set/<layout> as in layout/set/print.
See....
http://ez.no/doc/ez_publish/technical_manual/3_6/reference/modules/layout

The Web Application Service Provider

gregor de Lijzer

Saturday 30 July 2005 9:33:56 pm

o.k.
But in my eyes this makes sense if you only want to reorganize the look of your app. But is this the solution if i want to have different layouts for one node?

greg

Luc Chase

Sunday 31 July 2005 11:47:04 pm

I may not be understanding your issue. Perhaps you just need an override in your override.ini ? How (and when) do you want the user to select a layout? Do you want it selectable when the content is created or when it is being viewed etc.?

The Web Application Service Provider

K259

Monday 01 August 2005 5:55:20 am

Hi!

Yes, you have to define it in override.ini.

[full_node_yournodeid]
Source=node/view/full.tpl
MatchFile=node/view/patient_full_lab.tpl
Subdir=templates
Match[node]=yournodeid

Then you can access it with something like:
http://www.yoursitename.domain/content/view/full/yournodeid

gregor de Lijzer

Monday 01 August 2005 11:55:16 am

o.k. this is clear to me, but that's not really the/my problem. imagine a patient container has different items like a lab result,ecg. Nowi want the user to see the patients info and below the selected values. i try to make an ascii gui below

--------------------------------------------
Here's my header bla, bla,....
       DOE, John *22/07/1977
LAB   | Trop ... 1,4
ECG   | Mg   ... 105
X-RAY | Cl   ... 125
--------------------------------------------

By clicking LAB on the left side i want the lab results, stored in the patient container, shown below the patient info like shown above. The same with ECG,...
In my eyes all these templates are node/view/full ?

greg

Luc Chase

Monday 01 August 2005 12:06:57 pm

ok.... I THINK I understand what your're trying to do.
In your example I think (having done your data normalisation and identified your entities/classes) you need to define a content class for each (entity) type of content i.e. one for ECG another for X-RAY etc.
You then need to create an override of the full.tpl for each of the above types.
Then in the overrides.ini you create override rules, each targeting the specific class.
So, your overrides might be something like so...

[full_node_yournodeid]
Source=node/view/full.tpl
MatchFile=node/view/patient_full_lab.tpl
Subdir=templates
Match[class_identifier]=lab

The Web Application Service Provider

David Eriksson

Tuesday 02 August 2005 12:26:49 am

That's how I would do it as well I think. Let LAB, ECG, etc be children-objects to the Patient object, and it shouldn't be too hard to accomplish what you want.

The only other way I could think of is using variables to display different information using the same template. But that's an 'uglier' solution in my eyes.

/David

gregor de Lijzer

Sunday 07 August 2005 1:14:23 am

Thanks for the suggestions. Unfotunately i am on holiday right now ;) so will try it when i am back and will post my experiences.

thanks and greetings from spain/mallorca

greg

You must be logged in to post messages in this topic!

36 542 Users on board!

Forums menu