Export Relationships and Image Paths

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Export Relationships and Image Paths

Lex Medeiros
Hi,

I am upgrading the last remains of legacy files of our dotcms instance.

Is there a way to "export" the relationships of a structure so I can "import them again?

Also, is there a way to "export" all the image field logical paths that a structure has so I can import them back again?

Thanks,

Alex

--
http://dotcms.com - Open Source Java Content Management
---
You received this message because you are subscribed to the Google Groups "dotCMS User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/dotcms/CABzdpQkWWRvNiL-NcwbDO7bo3ZF9Hz%2BRdutPj%3DE4sLJWB3cHdQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Export Relationships and Image Paths

Chris Falzone-2
There is no export specifically, but you can use $dotcontent.pullRelated to pull the related content:
 https://dotcms.com/docs/latest/pull-and-display-related-content
From that you can construct your own export of sorts just outputting json or csv as you need.  
I think if you are constructing from the REST API you need to construct the query for it:
 +ContentType:ChildContentType +RelationshipName:$parentCon.identifier
Or the other way around:
+ContentType:ParentContentType +RelationshipName:$childCon.identifier

You can get whatever pathing you need from the content pull.  FileAssetMap has various methods:  
(that's what you get from the content pull)
I think you want either $con.ImageField.getUri() or $con.ImageField.getPath()

Hope that helps get what you need.


On Wed, Dec 27, 2017 at 11:55 PM Lex Medeiros <[hidden email]> wrote:
Hi,

I am upgrading the last remains of legacy files of our dotcms instance.

Is there a way to "export" the relationships of a structure so I can "import them again?

Also, is there a way to "export" all the image field logical paths that a structure has so I can import them back again?

Thanks,

Alex

--
http://dotcms.com - Open Source Java Content Management
---
You received this message because you are subscribed to the Google Groups "dotCMS User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/dotcms/CABzdpQkWWRvNiL-NcwbDO7bo3ZF9Hz%2BRdutPj%3DE4sLJWB3cHdQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

--
http://dotcms.com - Open Source Java Content Management
---
You received this message because you are subscribed to the Google Groups "dotCMS User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/dotcms/CAMAbHgXFsr_n0T2X_V2UuuXf36Gsz3QVrhUa5ptMXk%2BqyXTL1g%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Export Relationships and Image Paths

Jason Tesser-2
For the relationships 

So you can use webdav to get the files in.  Then update via the Import/Export functionality. 

On Thu, Dec 28, 2017 at 9:23 AM 'Chris Falzone' via dotCMS User Group <[hidden email]> wrote:
There is no export specifically, but you can use $dotcontent.pullRelated to pull the related content:
 https://dotcms.com/docs/latest/pull-and-display-related-content
From that you can construct your own export of sorts just outputting json or csv as you need.  
I think if you are constructing from the REST API you need to construct the query for it:
 +ContentType:ChildContentType +RelationshipName:$parentCon.identifier
Or the other way around:
+ContentType:ParentContentType +RelationshipName:$childCon.identifier

You can get whatever pathing you need from the content pull.  FileAssetMap has various methods:  
(that's what you get from the content pull)
I think you want either $con.ImageField.getUri() or $con.ImageField.getPath()

Hope that helps get what you need.


On Wed, Dec 27, 2017 at 11:55 PM Lex Medeiros <[hidden email]> wrote:
Hi,

I am upgrading the last remains of legacy files of our dotcms instance.

Is there a way to "export" the relationships of a structure so I can "import them again?

Also, is there a way to "export" all the image field logical paths that a structure has so I can import them back again?

Thanks,

Alex

--
http://dotcms.com - Open Source Java Content Management
---
You received this message because you are subscribed to the Google Groups "dotCMS User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/dotcms/CABzdpQkWWRvNiL-NcwbDO7bo3ZF9Hz%2BRdutPj%3DE4sLJWB3cHdQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

--
http://dotcms.com - Open Source Java Content Management
---
You received this message because you are subscribed to the Google Groups "dotCMS User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/dotcms/CAMAbHgXFsr_n0T2X_V2UuuXf36Gsz3QVrhUa5ptMXk%2BqyXTL1g%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

--
http://dotcms.com - Open Source Java Content Management
---
You received this message because you are subscribed to the Google Groups "dotCMS User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/dotcms/CALDe1GN0ADz9wvYY8atnjT7xFg%2BqJaYzBP9s0cTap78sTnaebQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Export Relationships and Image Paths

Lex Medeiros
Thank you Jason and Chris!

Is there a way to pull all legacy files in a dotcms instance?

I still have files since 1.9 so I would like to pull all legacy files, replace them and update to the latest dotcms version.

Alex

On Dec 28, 2017 8:42 AM, "Jason Tesser" <[hidden email]> wrote:
For the relationships 

So you can use webdav to get the files in.  Then update via the Import/Export functionality. 

On Thu, Dec 28, 2017 at 9:23 AM 'Chris Falzone' via dotCMS User Group <[hidden email]> wrote:
There is no export specifically, but you can use $dotcontent.pullRelated to pull the related content:
 https://dotcms.com/docs/latest/pull-and-display-related-content
From that you can construct your own export of sorts just outputting json or csv as you need.  
I think if you are constructing from the REST API you need to construct the query for it:
 +ContentType:ChildContentType +RelationshipName:$parentCon.identifier
Or the other way around:
+ContentType:ParentContentType +RelationshipName:$childCon.identifier

You can get whatever pathing you need from the content pull.  FileAssetMap has various methods:  
(that's what you get from the content pull)
I think you want either $con.ImageField.getUri() or $con.ImageField.getPath()

Hope that helps get what you need.


On Wed, Dec 27, 2017 at 11:55 PM Lex Medeiros <[hidden email]> wrote:
Hi,

I am upgrading the last remains of legacy files of our dotcms instance.

Is there a way to "export" the relationships of a structure so I can "import them again?

Also, is there a way to "export" all the image field logical paths that a structure has so I can import them back again?

Thanks,

Alex

--
http://dotcms.com - Open Source Java Content Management
---
You received this message because you are subscribed to the Google Groups "dotCMS User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/dotcms/CABzdpQkWWRvNiL-NcwbDO7bo3ZF9Hz%2BRdutPj%3DE4sLJWB3cHdQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

--
http://dotcms.com - Open Source Java Content Management
---
You received this message because you are subscribed to the Google Groups "dotCMS User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/dotcms/CAMAbHgXFsr_n0T2X_V2UuuXf36Gsz3QVrhUa5ptMXk%2BqyXTL1g%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

--
http://dotcms.com - Open Source Java Content Management
---
You received this message because you are subscribed to the Google Groups "dotCMS User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/dotcms/CALDe1GN0ADz9wvYY8atnjT7xFg%2BqJaYzBP9s0cTap78sTnaebQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

--
http://dotcms.com - Open Source Java Content Management
---
You received this message because you are subscribed to the Google Groups "dotCMS User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/dotcms/CABzdpQ%3D2vjRou%3DYj3TeBgC4md7k_RO6q4d4f-RnRa%3DktCpcL-A%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Export Relationships and Image Paths

Chris Falzone-2
There *used to be* a JSP in the distro to do this for you. you could use that or use it as a reference on how to look them up, but the only way I know is to use the API.
See:





On Thu, Dec 28, 2017 at 10:00 AM Lex Medeiros <[hidden email]> wrote:
Thank you Jason and Chris!

Is there a way to pull all legacy files in a dotcms instance?

I still have files since 1.9 so I would like to pull all legacy files, replace them and update to the latest dotcms version.

Alex

On Dec 28, 2017 8:42 AM, "Jason Tesser" <[hidden email]> wrote:
For the relationships 

So you can use webdav to get the files in.  Then update via the Import/Export functionality. 

On Thu, Dec 28, 2017 at 9:23 AM 'Chris Falzone' via dotCMS User Group <[hidden email]> wrote:
There is no export specifically, but you can use $dotcontent.pullRelated to pull the related content:
 https://dotcms.com/docs/latest/pull-and-display-related-content
From that you can construct your own export of sorts just outputting json or csv as you need.  
I think if you are constructing from the REST API you need to construct the query for it:
 +ContentType:ChildContentType +RelationshipName:$parentCon.identifier
Or the other way around:
+ContentType:ParentContentType +RelationshipName:$childCon.identifier

You can get whatever pathing you need from the content pull.  FileAssetMap has various methods:  
(that's what you get from the content pull)
I think you want either $con.ImageField.getUri() or $con.ImageField.getPath()

Hope that helps get what you need.


On Wed, Dec 27, 2017 at 11:55 PM Lex Medeiros <[hidden email]> wrote:
Hi,

I am upgrading the last remains of legacy files of our dotcms instance.

Is there a way to "export" the relationships of a structure so I can "import them again?

Also, is there a way to "export" all the image field logical paths that a structure has so I can import them back again?

Thanks,

Alex

--
http://dotcms.com - Open Source Java Content Management
---
You received this message because you are subscribed to the Google Groups "dotCMS User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/dotcms/CABzdpQkWWRvNiL-NcwbDO7bo3ZF9Hz%2BRdutPj%3DE4sLJWB3cHdQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

--
http://dotcms.com - Open Source Java Content Management
---
You received this message because you are subscribed to the Google Groups "dotCMS User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/dotcms/CAMAbHgXFsr_n0T2X_V2UuuXf36Gsz3QVrhUa5ptMXk%2BqyXTL1g%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

--
http://dotcms.com - Open Source Java Content Management
---
You received this message because you are subscribed to the Google Groups "dotCMS User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/dotcms/CALDe1GN0ADz9wvYY8atnjT7xFg%2BqJaYzBP9s0cTap78sTnaebQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

--
http://dotcms.com - Open Source Java Content Management
---
You received this message because you are subscribed to the Google Groups "dotCMS User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/dotcms/CABzdpQ%3D2vjRou%3DYj3TeBgC4md7k_RO6q4d4f-RnRa%3DktCpcL-A%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

--
http://dotcms.com - Open Source Java Content Management
---
You received this message because you are subscribed to the Google Groups "dotCMS User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/dotcms/CAMAbHgVjLYD1QBpD1rpJsSCP-TJstU3D%2B3rdzFWiDD6Xm3uQEA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.