Displaying Workspace (content app) on specific nod...
# help-with-umbraco
m
Hi, is anyone able to help me workout how i can display a workspace view or content app on specific nodes only. for example i only want to show it on a document node with the alias of "experiencePlatform" https://our.umbraco.com/forum/using-umbraco-and-getting-started/114552-limit-workspace-availability-to-document-type i come across this but he is using the guid of the node, but i want to do it via content node alias. thanks
Takes either a single string as a
match
parameter or array of strings as
oneOf
m
hey @rickbutterfield thanks for this! as you probably already know im a total newbie to 14. so as these are built into umbraco already, would it be a case of me just adding
Copy code
conditions: [
        {
            alias: 'Umb.Condition.WorkspaceContentTypeAlias',
            //match : 'blogPost'
            oneOf: ['blogPost', 'mediaType1'],
        },
    ],
};
or do i need to also create my own version of workspace-content-type-alias.condition.ts
r
You can add the code as you've got above to your own workspace conditions, replacing
match
or
oneOf
with the respective contentTypes
m
@rickbutterfield so I've been trying a couple ways of making this work, and come across a error
Copy code
Object literal may only specify known properties, and 'oneOf' does not exist in type 'UmbConditionConfigBase<string> | UmbMultipleAppLanguageConditionConfig'.ts(2353)
. the way my mainfest is set up, i am exporting the const manifests as an array of object. this was not being applied to specific document types, so i copied the GH code and re-wrote it and i feel that error could be the reason why. https://cdn.discordapp.com/attachments/1280147203498971211/1280184132596535306/image.png?ex=66d727e1&is=66d5d661&hm=557d82db9f195d9463ea3a0e5f0f78e64ba34b71b59e185f3abb2497fa5c311c&
r
Odd, that should work fine. What does the rest of your manifest file look like?
m
this is the way i was doing it initially im sorry i realsied my explanation of it was poor lol. and regarding your other question, the file is contains that code i sent before and the code in the screenshot below, i just commented it out so i can give it a try with how the gh code looked as i thought my code was the issue https://cdn.discordapp.com/attachments/1280147203498971211/1280185999518994522/image.png?ex=66d7299e&is=66d5d81e&hm=6ffa1529725a2de242a4e09ecb06444db2aacef1ae18c5102ed5672ba6da6ddc&
r
The
alias
and
match
in the first screenshot should be fine as is. Are you using TS or JS?
m
my manifest is a TS file
r
Ah, just checked the git history... this condition type has been added since the 14.2 release
Which means it's only going to come in 14.3, 3rd October release if my calendar is right
m
😢
I think if this is the case, i guess i could try copy the way umbraco is doing it looking at their GH, but then i worry the methods etc they are using aren't available on 14.2 yet either.
r
In theory, you could copy the whole of their
workspace-content-type-alias.condition.ts
file and it should let you use that as a condition
@rickbutterfield jsut a update, i think ive managed to get it working using couple bits and bobs from umbraco GH, thanks man! much love
7 Views