Use
Create
Develop
FAQ
Troubleshooting
History: Object References
View page
Collapse Into Edit Sessions
Source of version: 4
«
»
When creating object, auto-increment ids are used internally by Tikiwiki. Object references allow to track these object IDs during the profile creation to create relationships between the different objects. For example, when a tracker is created, the trackerId provided to it is arbitrary. Unless you know what that ID is, it is impossible to add fields or items to it in an automated way. It could be possible to __force__ the ID to a certain value, but this could cause conflicts if multiple profiles decided to use th same value. During profile installation, when a named object is encountered, the ID assigned to it is stored under the provided name. Other objects can access this value as a variable for any of their attributes. The ((object block)) contains all objects to be created. !!Category Tree Profile {CODE(caption=>YAML)} objects: - type: category ref: profile_category data: name: Profiles - type: category ref: app_category data: name: Tracker Applications parent: $profile_category - type: category data: name: Site Samples parent: $profile_category {CODE} As you can see, the profile defined here will create three distinct categories. ''Profiles'' will be the parent category and contain two child categories. These child categories find their parent by using a reference (__$''profile_category''__). This internal reference uses the name defined by the ''ref'' attribute. For more information about the category object type, see CategoryHandler. * Reference attributes (''ref'') ** are optional ** must be unique inside a profile ** can be useful to understand the ProfileHistory * Internal references (__$''object_name''__) ** must refer to an existing object ** act as a variable ** must not cause circular dependencies between objects * Inter-profile references (__$''ProfileName'':''object_name''__) ** must refer to an existing profile on the same site ** must not cause circular dependencies between profiles ** allow to refer to objects created by other profiles ** will cause the other profile to be installed * Cross-site references (__$''example.com'':''ProfileName'':''object_name''__) ** must refer to a valid Tikiwiki installation ** allows to create custom profile extensions on a personal host {CODE(caption=>SampleDataProfile,wrap=>1)} objects: - type: wiki_page ref: sample_page data: name: ((Sample Profile)) category: $CategoryTreeProfile:app_category content: | ... {CODE} References don't have to be in a logical place. Profiles are a big data structure. Each part may or may not be interpreted depending on what features are supported. {CODE(caption=>MyConfigurationRepositoryProfile,wrap=>1)} dependencies: # Could also be called dummy - $profiles.tikiwiki.org:BugTrackerProfile:bug_tracker - $profiles.tikiwiki.org:ClientManagementProfile:client_tracker - $profiles.tikiwiki.org:SampleDataProfile:sample_page {CODE} By installing the ''MyConfigurationRepositoryProfile'' profile, the following profiles would be installed: # ))BugTrackerProfile(( # ))ClientManagementProfile(( # ))CategoryTreeProfile(( # ))SampleDataProfile(( # ))MyConfigurationRepositoryProfile(( !!Alternative Syntax In larger portions of text, references can be be made using ''$profileobject:example.com:SampleProfile:object_name$''. The same reduced patterns can be used. This syntax is especially useful if a value in the object is fetched from a remote location using the ''wikicontent:'' handler. See ((Wiki Handler)) for an example.
History
Enable pagination
rows per page
HTML diff
Side-by-side diff
Side-by-side diff by characters
Inline diff
Inline diff by characters
Full side-by-side diff
Full side-by-side diff by characters
Full inline diff
Full inline diff by characters
Unified diff
Side-by-side view
Information
Version
Tue 26 of Oct, 2010 02:20 GMT-0000
Nelson Ko
remove confusing example
13
Actions
View
Source
Tue 26 of Oct, 2010 01:58 GMT-0000
Nelson Ko
Add clarification of example that does not work
12
Actions
View
Source
Sun 19 of Sep, 2010 04:42 GMT-0000
lindon
typo
11
Actions
View
Source
Mon 13 of Sep, 2010 22:24 GMT-0000
Marc Laporte
cleaner
10
Actions
View
Source
Tue 06 of Apr, 2010 13:40 GMT-0000
idealpragmatist
refactor dependencies to a separate page
9
Actions
View
Source
Mon 29 of Mar, 2010 20:01 GMT-0000
idealpragmatist
explain that ref: is what is meant.
8
Actions
View
Source
Mon 30 of Nov, 2009 04:38 GMT-0000
lindon
7
Actions
View
Source
Thu 16 of Apr, 2009 03:01 GMT-0000
Marc Laporte
6
Actions
View
Source
Thu 16 of Oct, 2008 03:33 GMT-0000
Marc Laporte
5
Actions
View
Source
Sat 23 of Aug, 2008 15:41 GMT-0000
Marc Laporte
4
Actions
View
Source
Thu 26 of Jun, 2008 22:42 GMT-0000
System Administrator
3
Actions
View
Source
Wed 04 of Jun, 2008 20:33 GMT-0000
System Administrator
2
Actions
View
Source
Wed 04 of Jun, 2008 19:54 GMT-0000
System Administrator
1
Actions
View
Source
Select action to perform with checked...
Remove
OK
Menu
Featured profiles
Profiles in Wizard
Profiles Todos
Handlers
Profiles Tester
Admin
of this site
Current Profiles
Tiki version
21.x
24.x
26.x
27.x
28.x
Deprecated
25.x
state
Not fully functional yet
alpha
beta
release
type
Available in the Profiles Wizard (12+)
Featured profiles
Full profile (out of the box & ready to go)
Learning profile (to show off feature)
Long tail
Mini-profile (can be included in other)
Profile-snippet (optional but needs another "parent" profile)
Security
Tests
Latest Changes
test_profile_change
test_new_personal_blog_and_profile
test_new_personal_blog_and_profile_vlog_include
Bootstrap Row and Col Plugin Aliases
Profile_Test_all_Modules_Test_all_Modules_page
Bug_Tracker_16
Bug_Tracker_16
Profile_Tracker_as_Calendar_page_09
Tracker_as_Calendar_09
TikiKart_Product_Include
Shopping_Cart
Scheduler_Presets_20
test_new_personal_blog_and_profile_post3_include
test_new_personal_blog_and_profile_post2_include
test_new_personal_blog_and_profile_post1_include
test_new_personal_blog_and_profile_about_include
test_new_personal_blog_and_profile_social_include
R_demo
Voting_System
Test_all_tracker_field_types_profile
...more
Like almost all *.tiki.org sites, you can log in with your login from
https://tiki.org
(register over there)
Search
Find
Most Popular Tags
admin
agenda
alias
antibot
antibot captcha
app
archive
articles
banning
batch
blogs
calculations
calendars
cart
categories
cluster
codemirror
comments
computation
contact us
datachannel
debug
debug console
dropdown with other
error messages
features
file galleries
forums
geo
geocms
geolocation
group homepages
group watches
header
i18n
images
item link
items list
jquery
languages
location
map
maps
maths
menu
menupage
multilingual
ol3
ol5
openlayers
paypal
plugin
plugin alias
plugin datachannel
plugin fade
plugin tabs
plugin trackerlist
pretty trackers
print
project management
r
r project
realnames
rss
static
static text
statistics
stats
structures
syntax highlighter
tablesorter
template
trackers
user watches
visualization
watches
webservice
wiki
wiki argument variables
wiki structures
Tiki Newsletter
Subscribe to the Tiki newsletter.
Don't miss major announcements and other news!