I have a client of mine who has a News section, upcoming and past news (archives). So what he wants is to have 2 seperate folders with the following structure
News 1. Upcomning 2. Archives News
Now the idea is to be able to move a Content Node from Upcomming News to Archives News by using a dropDown True/False which will allow the user to archive the news and at same this node will move to the Archives News folder.
Anyone can point out how to achieve this instead of using the traditional move to folderin umbraco.
Hi Fuji, yes the same link only to the wiki. sorry thought it only contained an overview. But you only need to change the date expire functionality to act on the value of the archived field on your document type and then it should work
I downloaded the zip file, is there any documentation to this?So i just need to change the way the date expire functionality will work, in my case change the alias and make sure when it returns to 1 the node will go under the Archieve news folder.
I have working solution for AutoArchive, which can archive your node from upcoming to archive news .... if you want to use it just change the alias of docunment type and property alias in this class file also change the node id of your archive folder and original folder. it will give you functionality of auto move to archive and if you want to move back to original folder agian when you click the save button ......
Here is the attached code :
This solution is based on the example available on the Umbraco wiki... thankx to writer
I think i used your example when i wrote this code ,,,, Thanks for such a good example but i got the problem when i pressed the save button using your example so ....it doesnt move the node to archive .... actualy i need to Click save button two times to move it to archive folder...... and then i twisted the code litl bit using doc instead of using sender directly ...and now its working well .... it move the node in single click .... but anyway great example and great help to other users by your example. Much appriciated.
I gave this a try but nothing is happening. Am not sure of doing the propert way thought. What i did i added your code in my template instead wrapped in a <script language ="C#">
Thanks for the reply again, i will work this out later. One question, how did you tell you node that this page is an Archive? Am using the a true/false select dropdown with a document alias archive. Are you using the same method?
I used a --- property in my document type ---- boolean ---- when i designed it called ---- Archive ---- which is the check box type
ok so when you click on Archive and click SAVE button it will move this node to Archive folder and again .... in archive folder if you unchecked it and click save button it will move back to original folder ....
Archiving news items with a Boolean
Hi all,
I have a client of mine who has a News section, upcoming and past news (archives). So what he wants is to have 2 seperate folders with the following structure
News
1. Upcomning
2. Archives News
Now the idea is to be able to move a Content Node from Upcomming News to Archives News by using a dropDown True/False which will allow the user to archive the news and at same this node will move to the Archives News folder.
Anyone can point out how to achieve this instead of using the traditional move to folderin umbraco.
//fuji
Hi Fuji,
How about an event handler that on save will check the property value and move it to the appropriate folder ?
HTH,
Hendy
Hi Fuji,
Checkout demo 2 of the event samples I wrote a while back.Almost what you need I think.
Cheers,
Richard
@Hendy
The Auto archive news in Example 2 seems to be the right one. But thing is that the client do not have an expiry date for the Items.
@Richard
The link you sent is not working.Is it the link Hendy sent?
Thanks
//fuji
Hi Fuji, yes the same link only to the wiki. sorry thought it only contained an overview. But you only need to change the date expire functionality to act on the value of the archived field on your document type and then it should work
Thanks Richard,
I downloaded the zip file, is there any documentation to this?So i just need to change the way the date expire functionality will work, in my case change the alias and make sure when it returns to 1 the node will go under the Archieve news folder.
//fuji
Hi Fuji,
I have working solution for AutoArchive, which can archive your node from upcoming to archive news .... if you want to use it just change the alias of docunment type and property alias in this class file also change the node id of your archive folder and original folder. it will give you functionality of auto move to archive and if you want to move back to original folder agian when you click the save button ......
Here is the attached code :
This solution is based on the example available on the Umbraco wiki... thankx to writer
Cheers,
Jigs
Hi Jigs,
Thanks for the help, I'll give this a try and will let you know, i also like Richards Method.
Cheers
//fuji
Hi Fuji,
The Example Jigs used does pretty much the same as my example. Sorry for the late reply, kinda snowed under.
Thanks,
Richard
Hi Richard,
I think i used your example when i wrote this code ,,,, Thanks for such a good example but i got the problem when i pressed the save button using your example so ....it doesnt move the node to archive .... actualy i need to Click save button two times to move it to archive folder...... and then i twisted the code litl bit using doc instead of using sender directly ...and now its working well .... it move the node in single click .... but anyway great example and great help to other users by your example. Much appriciated.
Cheers,
Jigs
Hi Jigs,
I gave this a try but nothing is happening. Am not sure of doing the propert way thought. What i did i added your code in my template instead wrapped in a <script language ="C#">
Hi Fuji,
i will tell you the step by step what you need to do
Cheers,
Jigs
Hi Jigs,
Thanks for the reply again, i will work this out later. One question, how did you tell you node that this page is an Archive? Am using the a true/false select dropdown with a document alias archive. Are you using the same method?
//fuji
Hi Fuji,
I used a --- property in my document type ---- boolean ---- when i designed it called ---- Archive ---- which is the check box type
ok so when you click on Archive and click SAVE button it will move this node to Archive folder and again .... in archive folder if you unchecked it and click save button it will move back to original folder ....
It works fine for me and I think pritty WELL
Hope it will help you
Cheers,
Jigs
Ok, so am doing the pretty much the same thing. I will let you know, but thanks for the help.
ok no worry,
If you find it as solution ...... give hive five .....
Thanks
Jigs
is working on a reply...