Selectable Create Location Sort Order


(system) #1

I have an asset builder where I have a popup with 4 different create locations.


How do I set an order of how the locations are to appear in the popup menu?



It's not even listing them in the popup in the same order I have them listed in the Create Selectable Locations part of the asset builder page.



On the frontend I get them in as General, Software, Important Student, Student in the popup but in the backend, they are listed as General, Software, Student, Important Student.



I'd like them to display in the same order I have them in the backend.



Update: I've just noticed the obvious in that it is sorting the popup by asset id. Is there any way to stop this?


(Avi Miller) #2

No, and there is already a feature request open for this: Bug #2844.

(system) #3

Thanks. I guess the only way round it is to create the locations so the assetids are in the order I want.

(Avi Miller) #4

Yes, that would work. :)

(Duncan Robertson) #5

I've been pulling hair out over asset builders this week. Simple answer - if I create an asset builder that creates three different assets:


News Asset

Image Asset

Single Calendar Event Asset



How do I make the news asset go into one designated folder, the image asset go into one designated folder and the calendar asset go into another without asking the user to specify?


(Avi Miller) #6

This is quite tricky -- I would probably create three different asset builders and nesting them into the same standard page. Then using JavaScript to hide/show them like a single asset builder would. It also gives you far more control over the individual create forms for each builder.

I very rarely use a single builder to create multiple asset types, but that's personal preference. :)

(Duncan Robertson) #7

OK Avi, I thought that might be the best way to do it. I tried to create triggers, which worked by linking specific asset types to the correct folders and leaving the origional files in one folder. But you can't run another trigger on a linked asset so I couldn't thumbnail any uploaded pictures and so on. So close yet so far! I'll make seperate asset builders.


Avi I've got a new domain coming under my portfolio which requires the biggest set of asset builders I've made so far for about 30 users. I've got a pretty good understanding of creating unique asset builders (ie for one user), but when I try clone a group of asset builders I always get Squiz errors and find it's about as quicker making them each by hand.



Here's the 400hour question. If I create one asset building system, how do I make quick multiples of the system?
Is this were paint layouts come in?


(Avi Miller) #8

I suppose that depends on what you mean by "system" -- if it is just a bunch of Asset Builders under a specific root node, you should look at "export_to_xml.php" and "import_from_xml.php" in the scripts/import/ directory. These two scripts will allow you to export assets as XML to your server and then re-import them later. This will allow you to create multiple instances of the same configuration.

I strongly recommend that you test this completely before using it in production though.

(Duncan Robertson) #9

That is exactly what I mean. A group of asset builders and asset listings that build a single customer facing page controlled by independent editors. How the hell do I get to scripts/import/ directory. The most access I have to my system in the root adminstrator? Do I need to contact Squiz support for this?


(Avi Miller) #10

If you don't have shell/SSH access, then you will need to speak to your system administrator(s) to get this access. The scripts are only accessible from the command line. If Squiz host your installation of MySource Matrix, then you should speak to Squiz Support, yes.

(Nic Hubbard) #11

Back to the original question in this post...

What I am wondering is, could I just replace the dynamic create location keyword, with a nested asset listing which creates a select menu. And the option values are set to the asset ID of that asset that is listed. That way, I could sort them however I want. I am not seeing anything obviously wrong with this idea. I have not tried this yet, so it is just an idea. Is there something internally that tells the asset builder that there is a dynamic create location configured? Or is all it is looking for is the select name and the asset ids?

Just wanted to check before I mess with my asset builders...

(Avi Miller) #12

As long as you recreate the right form elements, that should be fine. :slight_smile: The trick is getting the nested asset listing to use the right form element names, I suspect.


(Nic Hubbard) #13

It worked perfectly.

(Avi Miller) #14

Whee!

(autjoe) #15

Can anyone explain how to replace the dynamic create location keyword with a nested asset listing which creates a select menu.
Thanks.