RQL to choose subfolder of an Asset Manager folder

93 views
Skip to first unread message

Ryu

unread,
May 7, 2013, 2:04:39 AM5/7/13
to reddot-c...@googlegroups.com
Hi all,

Current project is setup with an asset manager folder with a bunch of sub-folders:

images/
  backgrounds/
  buttons/

Etc. The RQL queries in the documentation under the ELEMENTS or ELT section provide information to save to text / standard field values.
This works nicely if there are no subfolders as you can just set the value to the new file and be done.

Each element has two attributes : folderguid and subfolderguid. I don't see a way to modify these through queries in the documentation.

Has anyone run into this issue before?


Thanks for your time.

R. 

Tim D

unread,
May 7, 2013, 9:36:26 AM5/7/13
to reddot-c...@googlegroups.com
 The folderguid and subfolderguid are where it lives in asset manager not where it will be published. The true folders are only available on publish not in any other mode. In general pre-executing RQL is something to be avoided. You're best bet would be to use published server side code or javascripts. Failing that perhaps standard pre-execute perhaps.

Ryu

unread,
May 7, 2013, 1:49:52 PM5/7/13
to reddot-c...@googlegroups.com
I found what I needed

    <IODATA loginguid="$" sessionkey="$">
      <ELT action="save" reddotcacheguid="" guid="$" value="$" subdirguid="$" extendedinfo="">
      </ELT>
    </IODATA>

by looking at the CMS logs while manually doing the save on a field.

The reason I need this is to update existing page fields as the asset manager folders where restructured.

Thanks!

Jian Huang

unread,
May 7, 2013, 6:29:43 PM5/7/13
to reddot-c...@googlegroups.com, reddot-c...@googlegroups.com
Hi Ryu,

Now with info on what happened and what you wanted to do.  You can go into asset manager, select image, then there is an option to move that image to sub folder.  Then all elements using that image will update too.

It seems more out of the box and less work compared to through all content elements and firing that RQL one by one

Sent from my iPhone
--
You received this message because you are subscribed to the Google Groups "RedDot CMS Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to reddot-cms-use...@googlegroups.com.
To post to this group, send email to reddot-c...@googlegroups.com.
Visit this group at http://groups.google.com/group/reddot-cms-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Ryu

unread,
May 8, 2013, 12:30:04 PM5/8/13
to reddot-c...@googlegroups.com
Hi Jian,

It would work that way if they had everything under one dir and we just had added subfolders.

The difference is that they had multiple separate folders which where merged into a single asset folder with subdirectories.  So in this scenario we had to update every image placeholder to use the respective subfolder guid.

It wasn't as bad as you may think. I pulled all pages but on every page I only had to modify those that had a value set (default values don't count as a value set).

It ended up being just short of 30 minutes for around 3.5k page instances.


On Tuesday, May 7, 2013 1:04:39 AM UTC-5, Ryu wrote:

Jian Huang

unread,
May 8, 2013, 1:31:46 PM5/8/13
to reddot-c...@googlegroups.com
Hi Ryu,

I see.  What about images used in text placeholders?  Link correction in those are less fun.

-Jian

Ryu

unread,
May 8, 2013, 2:19:16 PM5/8/13
to reddot-c...@googlegroups.com
It's not as bad either. There are 2 formats that we've run to:

1) [ioID][folderGUID]/filename.ext
2) src="../ioLoadImage.asp?FolderGuid=[folderGUID]/filename.ext"

I made a small xml that maps old folder guid to new folder guid so it's just a matter of doing a string replace and saving the element. (and releasing the page if there was any change).

Again, you only do it for text placeholders that have a value set to reduce execution time.
Reply all
Reply to author
Forward
0 new messages