Importing menu links

14 views
Skip to first unread message

Mark Orciuch

unread,
Feb 24, 2021, 6:27:55 PM2/24/21
to dotCMS User Group
Hello,

I am wondering if there's a way to import menu links. It seems that import methods exist for all other content types but I can't find anything on menu links. Many thanks in advance.

Nathan Keiter

unread,
Feb 25, 2021, 12:02:27 AM2/25/21
to dot...@googlegroups.com
As of 5.2.1 I'm not familiar with a way to export or import menu links.


The storage mechanism is similar to content, but they aren't content yet. All versions of content are stored in the CONTENTLET table. The CONTENTLET_VERSION_INFO table maps the working and live versions.


All versions of links are stored in the LINKS table.


The LINK_VERSION_INFO table maps the working and live versions for a particular link.


The link-to-folder relationships are stored in the IDENTIFIER table where ASSET_TYPE = 'links'

Nathan I. Keiter | Lead Network Applications Programmer | I.D.E.A Council Member
Gettysburg College | Information Technology | DataSystems
Campus Box 2453 | 300 North Washington Street | Gettysburg, PA 17325
Phone: 717.337.6993
https://www.gettysburg.edu<https://www.gettysburg.edu/>
________________________________
From: dot...@googlegroups.com <dot...@googlegroups.com> on behalf of Mark Orciuch <mark_o...@ngsltd.com>
Sent: Wednesday, February 24, 2021 6:27 PM
To: dotCMS User Group
Subject: [dotcms] Importing menu links

CAUTION: This email originated from outside of the organization. Do not click links or open attachments unless you recognize the sender and know the content is safe.
________________________________
Hello,

I am wondering if there's a way to import menu links. It seems that import methods exist for all other content types but I can't find anything on menu links. Many thanks in advance.

--
http://dotcms.com<https://linkprotect.cudasvc.com/url?a=http%3a%2f%2fdotcms.com&c=E,1,9i0l93SFleQvJMYuKjLHek_I6yhvqcz6lQaoepfOK7vnGKS77DTNIOKb6-gCpnIqhfDo_GrVCoVTdAn4wLMV7SawYFu7O2ueGjZHyj2Zcni35UCJj1PksNQ,&typo=1> - 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 dotcms+un...@googlegroups.com<mailto:dotcms+un...@googlegroups.com>.
To view this discussion on the web visit https://groups.google.com/d/msgid/dotcms/52bac5e4-311f-474a-ab28-a93aac705d59n%40googlegroups.com<https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fgroups.google.com%2fd%2fmsgid%2fdotcms%2f52bac5e4-311f-474a-ab28-a93aac705d59n%2540googlegroups.com%3futm_medium%3demail%26utm_source%3dfooter&c=E,1,6ZJgapOWLT4q3B6pZ1Z8pbt6rAh0H4Sxq-A1WpEJNMdvrFTRRXEkc0s3myxSbMYjFKPzEw-H_ORMuukbUO6QU9ae-Rg1wqkuzHmd8EOJgLOr9x5UbXcHsfQzi2s,&typo=1>.

Mark Pitely

unread,
Feb 25, 2021, 9:20:30 AM2/25/21
to dot...@googlegroups.com
Mark,
I'd avoid Menu Links if you can.
What I do for things like that is put a container directly below the menu in the template, and use a structure, based on folder, to pull these links. You could just add them to the nav pull as well.
Typically, this is for 'external' links and/or intra-site links, so I can a) track them, and b)style them differently. And, of course, import/export as a structure.

I think it is poor usability to have items on the 'menu' that take you off the site/folder. Links that navigate you away from the menu you are on should be clearly marked/identified.

They are much easier to maintain this way, particularly if you have the same sort of links in many folders (i.e. many of our departments might link to 'Admissions').
The way menu links currently operate, you'd have to visit each folder and update each instance - that sucks.

Alternatively, you can also set up blank 'pages' with redirects on them (in the advanced menu on page properties, you can point it somewhere) which can be used instead of menu links and these are also exportable.
This also allows for easier future building, as the page is already there you can just add content and remove the redirect.  If you go this route, pick a dummy template or something so that when editors get to the page they realize it is forwarding, you cannot tell otherwise except on live.

Mark Pitely
Marywood University

--
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 dotcms+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/dotcms/1614229345104.49730%40gettysburg.edu.

Mark Orciuch

unread,
Feb 25, 2021, 11:17:08 AM2/25/21
to dotCMS User Group
Hi Nathan,

I am on the cloud platform so I don't have direct database access. It's a very interesting look under covers of dotCMS though. Thanks.

Nathan Keiter

unread,
Feb 25, 2021, 11:21:01 AM2/25/21
to dot...@googlegroups.com
I would imagine in some future release links will eventually become content. (Just as files, pages, and vanity URLs were converted in the past.)

Nathan I. Keiter | Lead Network Applications Programmer | I.D.E.A Council Member
Gettysburg College | Information Technology | DataSystems
Campus Box 2453 | 300 North Washington Street | Gettysburg, PA 17325
Phone: 717.337.6993
https://www.gettysburg.edu<https://www.gettysburg.edu/>
________________________________
From: dot...@googlegroups.com <dot...@googlegroups.com> on behalf of Mark Orciuch <mark_o...@ngsltd.com>
Sent: Thursday, February 25, 2021 11:17 AM
To: dotCMS User Group
Subject: Re: [dotcms] Importing menu links

CAUTION: This email originated from outside of the organization. Do not click links or open attachments unless you recognize the sender and know the content is safe.
________________________________
Hi Nathan,

I am on the cloud platform so I don't have direct database access. It's a very interesting look under covers of dotCMS though. Thanks.

On Wednesday, February 24, 2021 at 11:02:27 PM UTC-6 nke...@gettysburg.edu wrote:
As of 5.2.1 I'm not familiar with a way to export or import menu links.


The storage mechanism is similar to content, but they aren't content yet. All versions of content are stored in the CONTENTLET table. The CONTENTLET_VERSION_INFO table maps the working and live versions.


All versions of links are stored in the LINKS table.


The LINK_VERSION_INFO table maps the working and live versions for a particular link.


The link-to-folder relationships are stored in the IDENTIFIER table where ASSET_TYPE = 'links'

Nathan I. Keiter | Lead Network Applications Programmer | I.D.E.A Council Member
Gettysburg College | Information Technology | DataSystems
Campus Box 2453 | 300 North Washington Street | Gettysburg, PA 17325
Phone: 717.337.6993<tel:(717)%20337-6993>
https://www.gettysburg.edu<https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fwww.gettysburg.edu&c=E,1,UuFgErrMh1yavoQ6SVPbs3ljaParguD9eEa-aJt_xyAj40ylOHzY3cOnLcJWtBJOeJyq4viRgzr5coCj4sl4v0GR8_GxC6mCskT6ifGO&typo=1><https://www.gettysburg.edu/<https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fwww.gettysburg.edu%2f&c=E,1,3LYo9JUkHkML796QQtwfsAqGWATfM_TyWY1i6MbsVFnRW9Ao-C-msXiC3oKaG6z_a_ggKjRAP3g1lFOC6B7xWhmcGEOxxwQCTsK305bRKmXuiV5UDNc5fgk,&typo=1>>
________________________________
From: dot...@googlegroups.com <dot...@googlegroups.com> on behalf of Mark Orciuch <mark_o...@ngsltd.com>
Sent: Wednesday, February 24, 2021 6:27 PM
To: dotCMS User Group
Subject: [dotcms] Importing menu links

CAUTION: This email originated from outside of the organization. Do not click links or open attachments unless you recognize the sender and know the content is safe.
________________________________
Hello,

I am wondering if there's a way to import menu links. It seems that import methods exist for all other content types but I can't find anything on menu links. Many thanks in advance.

--
http://dotcms.com<https://linkprotect.cudasvc.com/url?a=http%3a%2f%2fdotcms.com&c=E,1,SJIB3zC7Th8tEkVMM_BSJJrRlO5VvzvGk5RAmYP0wLlA5SzJCqurnbDw-Yg8fA1pntK4jBb03eoCEfv9-gobjarGL6rlsaCBJMGb4fZhVg,,&typo=1><https://linkprotect.cudasvc.com/url?a=http%3a%2f%2fdotcms.com&c=E,1,9i0l93SFleQvJMYuKjLHek_I6yhvqcz6lQaoepfOK7vnGKS77DTNIOKb6-gCpnIqhfDo_GrVCoVTdAn4wLMV7SawYFu7O2ueGjZHyj2Zcni35UCJj1PksNQ,&typo=1> - 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 dotcms+un...@googlegroups.com<mailto:dotcms+un...@googlegroups.com>.
To view this discussion on the web visit https://groups.google.com/d/msgid/dotcms/52bac5e4-311f-474a-ab28-a93aac705d59n%40googlegroups.com<https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fgroups.google.com%2fd%2fmsgid%2fdotcms%2f52bac5e4-311f-474a-ab28-a93aac705d59n%2540googlegroups.com&c=E,1,Mq0yG17UExQhAbiq8k_3xOK8O4DV8aydHEzbMb0otVs1sE1UFerXSBmxFQnACTw23vKABdUCTFQ0GV6rX3ifyc0eVejRXlgXAxET56Glynrz9P1z&typo=1><https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fgroups.google.com%2fd%2fmsgid%2fdotcms%2f52bac5e4-311f-474a-ab28-a93aac705d59n%2540googlegroups.com%3futm_medium%3demail%26utm_source%3dfooter&c=E,1,6ZJgapOWLT4q3B6pZ1Z8pbt6rAh0H4Sxq-A1WpEJNMdvrFTRRXEkc0s3myxSbMYjFKPzEw-H_ORMuukbUO6QU9ae-Rg1wqkuzHmd8EOJgLOr9x5UbXcHsfQzi2s,&typo=1>.

--
http://dotcms.com<https://linkprotect.cudasvc.com/url?a=http%3a%2f%2fdotcms.com&c=E,1,eu4o58aACt1HV9U9lzNTrqCJhTJURkX7wjynwAWd_gbgCIO1y7nnqPnTOD08aRKB082FfqrLTLOnrPgJdEGQnkHdr_piexHa1hwd5KhmczIQJHCZFVKbo8g,&typo=1> - 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 dotcms+un...@googlegroups.com<mailto:dotcms+un...@googlegroups.com>.
To view this discussion on the web visit https://groups.google.com/d/msgid/dotcms/7ccbe739-4baf-46e1-90bd-2b4d15860a0dn%40googlegroups.com<https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fgroups.google.com%2fd%2fmsgid%2fdotcms%2f7ccbe739-4baf-46e1-90bd-2b4d15860a0dn%2540googlegroups.com%3futm_medium%3demail%26utm_source%3dfooter&c=E,1,CgGXPMGNituNgcyIXmh61H7Yi5_KE6MSUeYPaevsNON9mRO951XyqVrJlVUXqwyhVC3gv9bfMTL4lAZ_iSBSBcJtR1ufQwDtSA0ZxmomvFjnZ1MW&typo=1>.

Mark Orciuch

unread,
Feb 25, 2021, 11:24:29 AM2/25/21
to dotCMS User Group
Hi Mark,

Thanks for this. After thinking more about this, I came to a similar conclusion. External links in OpenCMS (the CMS I am migrating from) are stored in small .html files which contain something like this:

<html>
<head>
</head>
<body></body>
</html>

I tried importing these files as Document content type and everything works out of the box. So now I have a method to quickly import hundreds of these and also make them re-usable!

Reply all
Reply to author
Forward
0 new messages