Skip to content

Commit 705e346

Browse files
committed
Remove org and site from custom editor
1 parent 5a44c60 commit 705e346

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

blocks/browse/da-browse/da-browse.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,7 @@ export default class DaBrowse extends LitElement {
7777

7878
// Sort by length in descending order (longest first)
7979
const matchedConf = matchedConfs.sort((a, b) => b.length - a.length)[0];
80+
console.log(matchedConf);
8081

8182
return matchedConf.split('=')[1];
8283
}

blocks/browse/shared.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,12 @@ export default function getEditPath({ path, ext, editor }) {
22
if (ext === 'html' || ext === 'json') {
33
const route = ext === 'html' ? editor : '/sheet#';
44
const lastIndex = path.lastIndexOf(`.${ext}`);
5+
6+
if (route.includes('experience.adobe.com')) {
7+
console.log(`${route}/${path.substring(0, lastIndex).split('/').slice(3).join('/')}`);
8+
return `${route}/${path.substring(0, lastIndex).split('/').slice(3).join('/')}`;
9+
}
10+
511
return `${route}${path.substring(0, lastIndex)}`;
612
}
713
return `/media#${path}`;

0 commit comments

Comments
 (0)