Stumped on relating objects

Author Message

Joanie Chembars

Wednesday 12 January 2005 9:42:08 am

I can't seem to figure this out --
I am using 3.4.4.
Here's the situation >>
When the users register, they select which units (can be multiple) they belong to in our organization on the registration page.
These users then create 'articles' and I need to attach which unit that person belongs to onto the articles that they create. Why? So that if someone wants to search by unit they will see all the articles posted related to that unit.
Make any sense to you out there? Any hints would be greatly appreciated!!
Thanks --
Joanie

Joanie Chembars

Wednesday 12 January 2005 12:05:29 pm

OK -- I figured out that I can use the object relation datatype to link the article class to the folder where all of the users are stored. But, this provides a scrolling list of the users and I would like for it to automatically select the user that is entering the article.
Any ideas?

Joanie Chembars

Wednesday 12 January 2005 1:51:04 pm

Well, I now know what I need to do, just not how to do it ---
I need to get the current user's id number and make the object relation attribute take that value.
Am I missing something obvious???
help please........

Ɓukasz Serwatka

Wednesday 12 January 2005 1:57:25 pm

Hi,
Here is a example how to fetch user data
http://ez.no/ez_publish/documentation/reference/data_fetching/user/current_user

Personal website -> http://serwatka.net
Blog (about eZ Publish) -> http://serwatka.net/blog

Joanie Chembars

Thursday 13 January 2005 5:52:17 am

Can't believe I didn't run across that doc in all my searches. Exactly what I needed for the fetch. Halfway there, just need to figure out how to set that variable to the value now.
joanie

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.

eZ debug

Timing: Jan 31 2025 06:18:39
Script start
Timing: Jan 31 2025 06:18:39
Module start 'layout'
Timing: Jan 31 2025 06:18:39
Module start 'content'
Timing: Jan 31 2025 06:18:39
Module end 'content'
Timing: Jan 31 2025 06:18:39
Script end

Main resources:

Total runtime0.0129 sec
Peak memory usage2,048.0000 KB
Database Queries3

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0042 588.1328151.2109
Module start 'layout' 0.00420.0028 739.343836.6484
Module start 'content' 0.00700.0045 775.992294.1406
Module end 'content' 0.01150.0013 870.132833.9922
Script end 0.0128  904.1250 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.002116.5569140.0002
Check MTime0.00107.8122140.0001
Mysql Total
Database connection0.00075.160610.0007
Mysqli_queries0.002619.889330.0009
Looping result0.00000.194310.0000
Template Total0.00107.510.0010
Template load0.00075.626910.0007
Template processing0.00021.817010.0002
Override
Cache load0.00053.647010.0005
General
dbfile0.00021.868880.0000
String conversion0.00000.055540.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 1
 Number of unique templates used: 1

Time used to render debug report: 0.0001 secs