Developer forum

Forum » Development » DW8 ItemPublisher And Creator

DW8 ItemPublisher And Creator

Anders Ditlevsen
Anders Ditlevsen
Reply

Hi

On a solution we have setup 2 pages that links to each other, one with an item creator, that creates item onto an itemlist on the page. And one the lists them all out.

Standatd templates are being used, and you are able to create items on one page, and on the other they are listed and you have to option to "view" aswell as "edit" the item, so that u can edit whatever values are in the fields of the item you have created.

All the listing, creating and editing is happening from the frontend without a user being logged in (page is password proctected though)


The standard templates does not not contains any (as far as i can see) functionality to delete the items you have created and listed. Is this possible to do with some url or function call that just isnt in the templates but is avaliable, without being logged into the backend? Or is the deletion of items on itemlists protected from running outside of a backend or administrator login?

The solution is running on DW 8.8.1.32


Replies

 
Anders Ditlevsen
Anders Ditlevsen
Reply

Anyone who have setup simthing similar where u can delete items from the frontend, in accordance with above user case?

 
Nicolai Pedersen
Reply

Hi Anders

If you use a Razor template, you can send a parameter in querystring to the page and pick it up and react on it. I.e. ?deleteitem=true&deletepageid=123

In your Razor you do something like Dynamicweb.Content.Page.Delete(123) using 123 as the data from your querystring.

BR Nicolai

 
Anders Ditlevsen
Anders Ditlevsen
Reply

I wish not to delete a page. But an item that is on a itemList on a page. So not the page itself.

The parameters indicate you are deleting an a page item (the page itself i assume), or did i misunderstand your reply? :)

Best Regards
Anders 

 

You must be logged in to post in the forum