I've just thrown together quickly an asset builder for Thesaurus Terms, but it doesn't seem to want to generate any input html for the %details-F_name% value in the customised form.
Am I right in suspecting that it's not possible to make an asset builder for thesaurus terms?
No, you cannot use an asset builder to create thesaurus terms.
Thanks Greg. Is it likely that we will ever be able to create Thesaurus Terms using an asset builder?
Also, a suggestion - on an Asset Builder details screen, Matrix seems to list under 'Asset Types to Create' a long list of asset types. Assuming that this list includes other asset types that you can't create with an asset builder, perhaps there should be a custom list of asset types for that dropdown that only includes those you can create with an asset builder?
Unlikely I think. Thesaurus terms are not real assets, they just appear that way in the asset map. The asset builder doesn't understand how to create them.
[quote]Also, a suggestion - on an Asset Builder details screen, Matrix seems to list under 'Asset Types to Create' a long list of asset types. Assuming that this list includes other asset types that you can't create with an asset builder, perhaps there should be a custom list of asset types for that dropdown that only includes those you can create with an asset builder?[/quote]
Also unlikely, although often requested. Due to the flexible nature of Matrix, many tools cannot make assumptions about which of the installed assets types can be used. We'd have to create registrations systems where custom and core asset types can register themselves to be listed in various drop-downs, which would just end up with asset types being missing from drop-downs as developers forget. Better to have the full list in there and a few not work than to not have the one you need, even though it does work, and no way to actually select it without upgrading.
Coincidentally I was searching for the same functionality today.
So, would you use metadata values to make relations between assets?
Consider this situation:
For a small research institute I have a dynamic, growing collection of 30+ people profiles, 30+ projects and 10+ current events.
-I want to be able to show each items with and "related projects, people c.q. events".
- Front end users of the site (not admins) should be able to create new project pages and events
- When they create or edit a project or event, they should be able to select from a list which projects, events and people this asset relates to.
- In other words, the list of possible 'tags' is dynamic and is extended every time a user creates a new project or event
- I am aware of the fact that you can not change meta data values centrally once they have been set. This might be acceptable.
So, if you can not create Thesaurus terms on the fly I'm thinking not to use tags and related asset listings at all but to store my own 'tags' in metadata and
use search pages and asset listings to get to them?
Any best practices in this matter?
Matt
Matt
I have been working on implementations very similar to this. Best practice is a curious question in terms of Matrix implementation because it can change depending on the nature of the site e.g. If high traffic and/or lots of authors and/or/aswell lots of dynamic content(asset listings) then avoid adding more asset listings and metadata driven pages without proxying the front end.
I am using text metadata fields and an asset listings to generate select fields in the front end edit to submit the value. Then to tie everything together an asset list that groups on the metadata field. Varying success is experienced accross 3.18, 3.20 and 3.22 versions. There are a number of gotchas as you are setting up as well but I am sure you will have plenty of internal support to help you through that.
[quote]Coincidentally I was searching for the same functionality today.
So, would you use metadata values to make relations between assets?
Consider this situation:
For a small research institute I have a dynamic, growing collection of 30+ people profiles, 30+ projects and 10+ current events.
-I want to be able to show each items with and "related projects, people c.q. events".
- Front end users of the site (not admins) should be able to create new project pages and events
- When they create or edit a project or event, they should be able to select from a list which projects, events and people this asset relates to.
- In other words, the list of possible 'tags' is dynamic and is extended every time a user creates a new project or event
- I am aware of the fact that you can not change meta data values centrally once they have been set. This might be acceptable.
So, if you can not create Thesaurus terms on the fly I'm thinking not to use tags and related asset listings at all but to store my own 'tags' in metadata and
use search pages and asset listings to get to them?
Any best practices in this matter?
Matt[/quote]
I recommend using NOTICE links with a link value for this sort of relation.
We do however also have some code for dynamically creating tags from the front end that we did for a client that we need to put into core, if you need it I can accelerate this - need to go through it again.
I finished a new function for the Javascript API Asset that lets you create assets using javascript. I have tested it, and it can create Thesaurus Terms. This might be an option for you when this is added to the next release.
Douglas,
I see that we are both looking for the same functionality of associating certain pages with other pages.
(in my case Project pages, personal profiles and events)
I am looking into using NOTICE links and the Link manager asset builder.
(no results yet so don't pin me down on this)
Using text fields in metadata is messy and not very precise. Say you add
the title of a project page as a tag, when you change the name of the project you would have no easy way of updating that name in metatags that were already applied to assets throughout the site. I am sure we can all come up with clever ways of making this work but my feeling is it will remain a hack. You probably want to avoid going that route.
My (inexperienced) understanding of the thesaurus and related asset listings is:
The thesaurus as it is now is designed to work best with a predefined set of terms. If you have a finite number of departments and projects and it's ok when a new one is created that a site admin (you) adds it to the backend then that's fine.
Apparently there are some other issues with it (performance of related asset listing and the fact you can't easily print thesaurus term with a keyword) Please correct me if I'm wrong.
I am looking for a way to have frontend users create content that then can be related to immediately.
Although the "Javascript API Asset" mentioned by Nic Hubbard" and the "some code for dynamically creating tags from the front end" mentioned by Justin are worthy of investigating, there is probably some work needed to be done into this and some uncertainty about the result. (see previous posts).
At it is not part of the Matrix core yet and I have no idea how much work is involved in getting it to work I am going to try current functionality first.
So, it depends on what you need (dynamic or static lists of terms).
I will keep you posted.
Matt
I went through the development we did before and hope we can get the cleaned up version of it in core next week (it needs a bit of work).
It is basically a Set Tag Trigger action that takes names not IDs, and can create new tags as well in a specified thesaurus.
[quote]I went through the development we did before and hope we can get the cleaned up version of it in core next week (it needs a bit of work).
It is basically a Set Tag Trigger action that takes names not IDs, and can create new tags as well in a specified thesaurus.[/quote]
That sounds promising. If I understand correctly it would be possible to use to:
- create a new asset (say standard page or event) with an asset builder
- on commit fire a trigger that uses an attribute, say that standard page’s name, and create a thesaurus term?
Currently, I am implementing your suggestion to use NOTICE links and this looks quite promising as well (and because it is available now I am continuing with that for the moment)
However, I have to make the linking available to the user via simple edit interface or Link Manager pages.
About available keywords:
In the Simple Edit interface for "linking’, I only have “%linking-%” available, which shows me the complete backend linking screen. This is a bit confusing for a frontend user.
Are there more specific keywords for linking available? The hyphen suggests that I might expand on “%linking-%”, (i.e. %linking-assetid% or %linking-current-links%)
In general my question is:
Are all keywords always available in the pop window under “Click here for a list of specific asset keywords available for use in Simple Edit Mode.” ??
The list at http://matrixsecrets.com/2009/02/mysource-keywords is very useful but definitely not complete. Is there a complete list of all possible Simple Edit keywords?
I apologize if I am asking something very obvious and have not looked hard enough.
Matt
Another issue with using Linking to related assets to each other:
You have to link both ways (with a trigger?) otherwise it does not work.
For our purpose we want to list the links between project 'Panda' and the related person 'Che'.
- We go to the 'Linking' screen under 'Project Panda' and add a NOTICE link to 'Che Guevara'
- This results in the following asset tree:
Projects (Folder)
Project Panda (Standard page)
People (Folder)
Che Guevara (Standard page)
Project Panda (type NOTICE link)
- We now want to show on our frontend page of 'Project Panda' and list of people related to 'Project Panada'.
But because 'Panda' is linked underneath 'Che' (i.e. the linked asset 'Panda' only exist underneath the asset 'Che') we have to create an asset listing of NOTICE links with 'Che' as Root node.
- So to make this technique work we need to create a link in the linking screen of 'Panda' to 'Che', we have to fire a trigger that links 'Che' back to 'Panda'
However, I was unable to create a trigger to do this as the "source" asset can not be made dynamic, only the 'target asset can be made dynamic in the trigger:
So my questions:
- How can I create a link 'back' when I link one asset to another
- If I don't link back, what other way is there to list the assets that have NOTICE links to myself so I can list them on the frontend?
You could make it work the other way around. Rather than a registry of what assets can be built by the asset builder, just create a registry of what assets can't be built by the asset builder.
This means that if a developer forgets all that happens is an asset that can't be built appears in the list (the same at the moment, but hopefully on a smaller scale) rather than the other scenario where if a developer forgets an asset that may work is missing and requires an upgrade/custom patching.
Greg wrote:
[quote]Also unlikely, although often requested. Due to the flexible nature of Matrix, many tools cannot make assumptions about which of the installed assets types can be used. We'd have to create registrations systems where custom and core asset types can register themselves to be listed in various drop-downs, which would just end up with asset types being missing from drop-downs as developers forget. Better to have the full list in there and a few not work than to not have the one you need, even though it does work, and no way to actually select it without upgrading.[/quote]
Thanks for the answer Greg. I can appreciate that preventing the situation might be difficult given the complexity of the system - although I do wonder if David Schoen's suggestion might not be worth considering as a solution?
The documentation (as of 3.22) doesn't mention that asset builders can't create all asset types, perhaps it should make some mention that asset builders don't allow for the creation of all asset types?
Matt wrote:
[quote]I see that we are both looking for the same functionality of associating certain pages with other pages.
(in my case Project pages, personal profiles and events)
…
The thesaurus as it is now is designed to work best with a predefined set of terms. If you have a finite number of departments and projects and it's ok when a new one is created that a site admin (you) adds it to the backend then that's fine.[/quote]
Hi Matt - I think our current cms usage is more along this line - I've just been contemplating the how of 'how do we create more subjects' and wondering if there was a frontend solution as well as the obvious backend solution.
[quote]Another issue with using Linking to related assets to each other:
You have to link both ways (with a trigger?) otherwise it does not work.
For our purpose we want to list the links between project 'Panda' and the related person 'Che'.
- We go to the 'Linking' screen under 'Project Panda' and add a NOTICE link to 'Che Guevara'
- This results in the following asset tree:
Projects (Folder)
Project Panda (Standard page)
People (Folder)
Che Guevara (Standard page)
Project Panda (type NOTICE link)
- We now want to show on our frontend page of 'Project Panda' and list of people related to 'Project Panada'.
But because 'Panda' is linked underneath 'Che' (i.e. the linked asset 'Panda' only exist underneath the asset 'Che') we have to create an asset listing of NOTICE links with 'Che' as Root node.
- So to make this technique work we need to create a link in the linking screen of 'Panda' to 'Che', we have to fire a trigger that links 'Che' back to 'Panda'
However, I was unable to create a trigger to do this as the "source" asset can not be made dynamic, only the 'target asset can be made dynamic in the trigger:
So my questions:
- How can I create a link 'back' when I link one asset to another
- If I don't link back, what other way is there to list the assets that have NOTICE links to myself so I can list them on the frontend?[/quote]
You can do upwards and downwards links to follow the links in both directions, so you dont need to make links in both directions. (ie up the tree and down the tree settings on asset listing).
Can you explain? I have been trying lot's of things and my feeling is I am missing out on something obvious.
Going back to the example:
For our purpose we want to list the links between project 'Panda' and the related person 'Che'.
1. We go to the 'Linking' screen under 'Project Panda' and add a NOTICE link to 'Che Guevara'
2. This results in the following asset tree:
[codebox]
Projects (Folder)
Project Panda (Standard page)
People (Folder)
Che Guevara (Standard page)
Project Panda (type NOTICE link)
[/codebox]
3. We now want to show the frontend page of 'Project Panda' and list the people related to 'Project Panada'.
4. How do I make a efficient asset listing that will give me "Che" without searching the whole asset tree?
5. Remember that "People" is not underneath "Projects". They are on the same level. I also want to have
a folder "Events" en "Documents" and related those assets to each other.
6. Plus: When I go to Che Guevara's page I want to list the projects that relate to him.
Can you give me some specific pointers because it is difficult to get the setup just right if you are not sure if it supposed to work at all?
Thanks a million. This would make both projects I'm starting at the moment work.
Matt
Ok,
gettig closer.
I understand your comment about being able to find NOTICE links up and down the tree. This works.
Now, the next, and most important part is how you set the link to both the target and the source.
I have succeeded by making a trigger:
[codebox]Asset accessed
- Tree location: Some parent of all content assets
- URL matches "setlink"
- Create link
Ignore permissions
Link as the "Child" of the asset "dummy asset"
using NOTICE link
Target asset: GET Variable name "target"
- Create link
Ignore permissions
Link as the "Parent" of the asset "dummy asset"
using NOTICE link
Target asset: GET Variable name "target"
- Call url in browser:
Source = Project Panda (22356)
Target = Jay Leno (22364)
http://sandstorm.squiz.co.nz/mouritsm/cacr/content/projects/project-panda/?setlink&target=22364[/codebox]
This creates Two links, from Panda to Jay and back, Perfect!
Now I need a trigger to delete the links, but I don’t get it to work. The trigger for “Remove link” is less functional and has some confusing terminology:
I tried:
[codebox]Remove Links
- Ignore Permissions
- As linked to the Broadcasting Asset, which also resides under the Root Node: "Some parent of all content assets"
- With Link Type: NOTICE
- and Link Value: Any link value
- Linked Asset Type: Standard page
- Candidate Assets: GET Variable name “target”
Then I call in the browser:
http://sandstorm.squiz.co.nz/mouritsm/cacr/content/projects/project-panda/?setlink&target=22364
[/codebox]
This does not do anything. When I replace Candidate Assets for “current assetid” it removes ALL Notice links under current asset, not just one.
What does “Candidate Assets” mean? I would assume that was the asset that you have current asset linked under and the link you want removed.
Any thoughts?
Matt
Dont create links in both directions, it is going to get difficult, use listings in both directions.
Currently as you see you can only delete links whose parent is the asset that fires the trigger, I guess it should be called "Remove child links" and we should make another one "Remove parent links". The candidate links are the child assets as far as I remember, so setting that to current asset is not going to work, but setting to a GET var which is the other end of the relation should work.
Will try to find some time to do some testing - we have got this working, but had to add some of that trigger functionality to do it!
Yes, I have played with this idea as well.
But I want to offer an transparent and user friendly interface for the content editors to associate People, Projects, events and documents with each other.
And at the same I want a construction that is clear for myself and other implementers in the future. I could
create rules that say "If you want to link a person to a project then the link is in the person's Link Manager" but "If you want to link a journal to a person the link is in the Journal's Link manager"
I would want to avoid this situation (for sanity's sake ;-))
I understand that the Linking was not meant to be used as a two-way "related asset"-like tool so perhaps this is not the best way?
Two alternatives:
- When the functionality of dyamically adding Thesaurus words become availble (any idea when) Do you think that using tags and related asset listing would be a good route to take?
- Another idea I had was to have a "related" folder underneath each asset and add Redirect pages to related assets. I'm not sure If I can persuade some asset builders and/or trigger to create the Redirect Pages in both directions, and it would be a bit of a hack, but it might work.
Any other suggestions?
Matt
[quote]Yes, I have played with this idea as well.
But I want to offer an transparent and user friendly interface for the content editors to associate People, Projects, events and documents with each other.
And at the same I want a construction that is clear for myself and other implementers in the future. I could
create rules that say "If you want to link a person to a project then the link is in the person's Link Manager" but "If you want to link a journal to a person the link is in the Journal's Link manager"
I would want to avoid this situation (for sanity's sake ;-))
I understand that the Linking was not meant to be used as a two-way "related asset"-like tool so perhaps this is not the best way?
Two alternatives:
- When the functionality of dyamically adding Thesaurus words become availble (any idea when) Do you think that using tags and related asset listing would be a good route to take?
- Another idea I had was to have a "related" folder underneath each asset and add Redirect pages to related assets. I'm not sure If I can persuade some asset builders and/or trigger to create the Redirect Pages in both directions, and it would be a bit of a hack, but it might work.
Any other suggestions?
Matt[/quote]
It is kind of hard to say in general - are your relations transitive, and are the endpoints typed?
If say Users favourite Articles (a common case) then it is fairly easy to make the interface so it builds the links in the right way regardless (well, fairly easy, let me know if you run into issues), and usually the UI dictates that you will be on the article when you favourite it as otherwise you would not be able to know which article. Linking to current user can be done in the trigger.
"People, Projects, events and documents" sounds rather like a project we did (which is what we did the tagging for). I can do a screenshare walkthrough of the backend if that would help.
Generally related content folders have a lot of issues, its not generally a good idea to use them if possible, although if you are carefull to make sure they dont get extra URLs you can manage, but you end up with extra tree IDs etc which are not good.