Exlude External Link from Nav?
Permalink 8 users found helpful
I've got a few External Links added to my sitemap via the dashboard...but I need them to be excluded from my main navigation...how can one go about doing this? You can't apply custom attributes to external links....
Actually, you CAN do it! I found in another thread that by going to the Page Search tab, you can see all the pages in the site map including External Links.
From there, you can click on an External Link page and get the same options as a normal page.
I was able to add Exclude Nav and an Include Footer (a custom attribute I'm using) to my External Links and it works PERFECT.
From there, you can click on an External Link page and get the same options as a normal page.
I was able to add Exclude Nav and an Include Footer (a custom attribute I'm using) to my External Links and it works PERFECT.
I've just marked you helpful thread. Didn't know that myself. Good man.
Ahh-ha!
I was always using a bit of Firebug trickery to be able to change attributes on an external link, but this seems much easier. Nice work!
I was always using a bit of Firebug trickery to be able to change attributes on an external link, but this seems much easier. Nice work!
Thank you SO much for this! I've been looking for a solution to this problem for a long time.
You, sir, win the internet. :D
You, sir, win the internet. :D
Hello all, here is my solution. YMMV. I've had no probs so far.
So you can search for the page and modify the properties there...or...
copy concrete/js/ccm.sitemap.js to /js/ccm.sitemap.js and make this mod( v5.4.2.2 ) but i'm sure you can do this for any version.
around line 37 in your copied version find
change to
or place the attached modified version in the directory mentioned above.
So you can search for the page and modify the properties there...or...
copy concrete/js/ccm.sitemap.js to /js/ccm.sitemap.js and make this mod( v5.4.2.2 ) but i'm sure you can do this for any version.
around line 37 in your copied version find
if (obj.cAlias == 'LINK') { html += '<li><a class="ccm-icon" dialog-width="350" dialog-height="300" dialog-title="' + ccmi18n_sitemap.editExternalLink + '" dialog-modal="false" id="menuLink' + obj.cID + '" href="' + CCM_TOOLS_PATH + '/edit_collection_popup.php?rel=SITEMAP&cID=' + obj.cID + '&ctask=edit_external"><span style="background-image: url(' + CCM_IMAGE_PATH + '/icons/add.png)">' + ccmi18n_sitemap.editExternalLink + '<\/span><\/a><\/li>'; }
change to
if (obj.cAlias == 'LINK') { html += '<li><a class="ccm-icon" dialog-width="350" dialog-height="300" dialog-title="' + ccmi18n_sitemap.editExternalLink + '" dialog-modal="false" id="menuLink' + obj.cID + '" href="' + CCM_TOOLS_PATH + '/edit_collection_popup.php?rel=SITEMAP&cID=' + obj.cID + '&ctask=edit_external"><span style="background-image: url(' + CCM_IMAGE_PATH + '/icons/add.png)">' + ccmi18n_sitemap.editExternalLink + '<\/span><\/a><\/li>'; html += '<li><a class="ccm-icon" dialog-width="640" dialog-height="310" dialog-modal="false" dialog-title="' + ccmi18n_sitemap.pageProperties + '" id="menuProperties' + obj.cID + '" href="' + CCM_TOOLS_PATH + '/edit_collection_popup.php?rel=SITEMAP&cID=' + obj.cID + '&ctask=edit_metadata"><span style="background-image: url(' + CCM_IMAGE_PATH + '/icons/edit_small.png)">' + ccmi18n_sitemap.pageProperties + '<\/span><\/a><\/li>'; }
or place the attached modified version in the directory mentioned above.
in 5.5+ this seems to have moved to
/concrete/js/ccm_app/sitemap.js
and now around line 47, I have not tested it yet, so please be careful but it should work
** Edit **
I think I had that wrong, I needed to edit the file in the
ccm.app.js
location is /concrete/js/ccm.app.js
Now its hard to find as its one long line I searched for "editExternalLink" then I replaced the following
That seems to do it,
a big thanks to Hackoptamus
/concrete/js/ccm_app/sitemap.js
and now around line 47, I have not tested it yet, so please be careful but it should work
if (obj.cAlias == 'LINK') { html += '<li><a class="ccm-menu-icon ccm-icon-edit-external-link" dialog-width="350" dialog-height="170" dialog-title="' + ccmi18n_sitemap.editExternalLink + '" dialog-modal="false" dialog-append-buttons="true" id="menuLink' + obj.cID + '" href="' + CCM_TOOLS_PATH + '/edit_collection_popup.php?rel=SITEMAP&cID=' + obj.cID + '&ctask=edit_external">' + ccmi18n_sitemap.editExternalLink + '<\/a><\/li>'; html += '<li><a class="ccm-menu-icon ccm-icon-properties-menu" dialog-width="640" dialog-height="360" dialog-append-buttons="true" dialog-modal="false" dialog-title="' + ccmi18n_sitemap.pagePropertiesTitle + '" id="menuProperties' + obj.cID + '" href="' + CCM_TOOLS_PATH + '/edit_collection_popup.php?rel=SITEMAP&cID=' + obj.cID + '&ctask=edit_metadata">' + ccmi18n_sitemap.pageProperties + '<\/a><\/li>'; }
** Edit **
I think I had that wrong, I needed to edit the file in the
ccm.app.js
location is /concrete/js/ccm.app.js
Now its hard to find as its one long line I searched for "editExternalLink" then I replaced the following
b+='<li><a class="ccm-menu-icon ccm-icon-edit-external-link" dialog-width="350" dialog-height="170" dialog-title="'+ccmi18n_sitemap.editExternalLink+'" dialog-modal="false" dialog-append-buttons="true" id="menuLink'+f.cID+'" href="'+CCM_TOOLS_PATH+"/edit_collection_popup.php?rel=SITEMAP&cID="+f.cID+'&ctask=edit_external">'+ccmi18n_sitemap.editExternalLink+"</a></li>" //with b+='<li><a class="ccm-menu-icon ccm-icon-edit-external-link" dialog-width="350" dialog-height="170" dialog-title="'+ccmi18n_sitemap.editExternalLink+'" dialog-modal="false" dialog-append-buttons="true" id="menuLink'+f.cID+'" href="'+CCM_TOOLS_PATH+"/edit_collection_popup.php?rel=SITEMAP&cID="+f.cID+'&ctask=edit_external">'+ccmi18n_sitemap.editExternalLink+'</a></li><li><a class="ccm-menu-icon ccm-icon-properties-menu" dialog-width="640" dialog-height="360" dialog-append-buttons="true" dialog-modal="false" dialog-title="'+ccmi18n_sitemap.pagePropertiesTitle + '" id="menuProperties'+f.cID+'" href="'+CCM_TOOLS_PATH+ '/edit_collection_popup.php?rel=SITEMAP&cID='+f.cID+'&ctask=edit_metadata">'+ccmi18n_sitemap.pageProperties+'<\/a><\/li>'
That seems to do it,
a big thanks to Hackoptamus
Thinking outside the box, a javascript redirect inserted into a C5 page to your link will give you full conttrol over the page exclude in your navigation.