Anyone got an idea how to do it
? i want to prevent users from opening the certain folder from tree.
If you wondering why would i
want this, well.. i want to present the content items as a table view and not
as the umbraco tree, my site will have a news section but with a lot of
articles so opening all of them from the tree will not look good and also i want
to add more filtering like from and to date.
My idea was to make a macro
data type that display all of the Childs as table (which i did and it works)
but now all i have left is not showing the news articles in the tree.
Other option could be hiding
certain DocType from tree (permanently or by user).
Have you considered creating a dashboard control for display the news articles in a table format. Or even creating a custom section, although given that this is content and doesn't require a custom tree you could get away with making a dashboard control in the Content section.
Option 1: the "let's tackle that big mole hill" route
As I understand it you have a lot of nodes as soon as you hit any of these sections. Could a better approach be to filter the blog & news posts into year & month folders?
While I don't have the code to hand, on a few of the sites I've worked on we have the following set up.
News/Blog Root
Year folder (Auto generated DateFolder Document Type)
Users wouldn't be able to create content in the DateFolder document types. Instead they'd create news/blog articles at the root and they'd then get positioned in the relevant year/month folder by a published datetime property (prepopulated at today's date).
I hope you don't mind me suggesting this. I'm interested by your solution and how you arrived at it. After all, if you're doing something differently for a good reason it'll challenge how I'd percieve the same problem.
Option 2: The "okay, so what's the alternative?" route
I honestly didn't have a better name for option 2. Given that you want to have a generic control you can pass in a content root (say a blog root or news list). You could add (and I grimace when I say this) a item to the context menu when you right click on a relevant node.
The context menu option, let's say "Edit Entries" would open up a modal or change the right hand section (not sure exactly about that option, but it should just be JavaScript) containing the table based on the node id.
The table control would sit in a web form or perhaps a Surface Controller might be best if you're running on v4.10+ (see: Surface Controllers wiki page). Although, I've not actually made a Surface Controller myself to assist any further. This would then provide a means of editing your content as you'd wish :)
I would certainly say, that's not the "Umbraco way" :P Using data types as an "overview" instead isn't what they were intended for.
I believe you could still achieve what you have going on here via a context menu item, which is relatively straightforward to add this into the right click context menu reachable item whilst still keeping what you've already made, for the most part.
That may or may not future proof with Belle although I've not been following news on it recently.
disable open folder from specific tree folder
hi guys,
Anyone got an idea how to do it ? i want to prevent users from opening the certain folder from tree.
If you wondering why would i want this, well.. i want to present the content items as a table view and not as the umbraco tree, my site will have a news section but with a lot of articles so opening all of them from the tree will not look good and also i want to add more filtering like from and to date.
My idea was to make a macro data type that display all of the Childs as table (which i did and it works) but now all i have left is not showing the news articles in the tree.
Other option could be hiding certain DocType from tree (permanently or by user).
Thank you all in advanced,
nadav
Hi Nadav,
Have you considered creating a dashboard control for display the news articles in a table format. Or even creating a custom section, although given that this is content and doesn't require a custom tree you could get away with making a dashboard control in the Content section.
If you need information on that, you'll find what you need here: http://our.umbraco.org/wiki/reference/files-and-folders/dashboardconfig
Then as you suggested hiding the documents via user permissions.
Jamie
hi jamie. thnks for the reply
i was thinking about dashborad and on sections, but i aiming to do something more generic
that will work on all content item like if you have not just articles in your site
but also blogs, contacts, galleries etc. these content types usually tend to have a lot of records,
and more comfortable to edit as table.
second, i have to be able to use the tree's context menu for all the items actions.
I've manage to do so with a little JS hack (not very nice coding i know...)
i know my idea is a bit weird and not the umbraco way, i think it's worth a shot
nadav
Hi Nadav,
That's cool. I got a two options for you.
Option 1: the "let's tackle that big mole hill" route
As I understand it you have a lot of nodes as soon as you hit any of these sections. Could a better approach be to filter the blog & news posts into year & month folders?
While I don't have the code to hand, on a few of the sites I've worked on we have the following set up.
Option 2: The "okay, so what's the alternative?" route
I honestly didn't have a better name for option 2. Given that you want to have a generic control you can pass in a content root (say a blog root or news list). You could add (and I grimace when I say this) a item to the context menu when you right click on a relevant node.
The context menu option, let's say "Edit Entries" would open up a modal or change the right hand section (not sure exactly about that option, but it should just be JavaScript) containing the table based on the node id.
The table control would sit in a web form or perhaps a Surface Controller might be best if you're running on v4.10+ (see: Surface Controllers wiki page). Although, I've not actually made a Surface Controller myself to assist any further. This would then provide a means of editing your content as you'd wish :)
I hope either of these options helped!
hi jamie,
well, i've managed to it with a small JS that re-position the context menu to the right panel,
and hiding the open-closed on the folder.
down side is that it will probably won't support future versions (belle)
it looks like this:
http://i41.tinypic.com/j90ytd.jpg
(UI is not complete yet)
thanks for all your help
Hi Nadav,
I would certainly say, that's not the "Umbraco way" :P Using data types as an "overview" instead isn't what they were intended for.
I believe you could still achieve what you have going on here via a context menu item, which is relatively straightforward to add this into the right click context menu reachable item whilst still keeping what you've already made, for the most part.
That may or may not future proof with Belle although I've not been following news on it recently.
Jamie
is working on a reply...