How can we implement show in one form my details articles?
I know an example from the pages!
THandlers.AddRootHandler('', '/', FormHandler)
with THandlers.Add('', '1', TContentForm.Create(TShopForm)) do
begin
CanStartSession := true;
RequiresSessionStart := false;
end;
Example:
http://localhost/shop/1 -> Details for article 1
http://localhost/shop/2 -> Details for article 2
http://localhost/shop/3 -> Details for article 3
Is there any demo?
If I understood it correctly you want a content handler to just render the content of the article, not the whole form, is that correct?
(03-23-2023, 11:10 PM)Alexandre Machado Wrote: [ -> ]If I understood it correctly you want a content handler to just render the content of the article, not the whole form, is that correct?
I want to implement a page for reading items. The link is from QR code.
In one QR code is link http://mysite/items/1 for details article 1 and other QR code link is http://mysite/articles/2 for details article 2
I can also be http://mysite/items/id=1, http://mysite/items/id=2 for show article. I would like read ID or KEY in link
I hope you understand. What concept?
(03-23-2023, 12:49 PM)matija Wrote: [ -> ]How can we implement show in one form my details articles?
I know an example from the pages!
THandlers.AddRootHandler('', '/', FormHandler)
with THandlers.Add('', '1', TContentForm.Create(TShopForm)) do
begin
CanStartSession := true;
RequiresSessionStart := false;
end;
Example:
http://localhost/shop/1 -> Details for article 1
http://localhost/shop/2 -> Details for article 2
http://localhost/shop/3 -> Details for article 3
Is there any demo?
If I recall, the ContentHandler demo does exactly what you may be asking about. It returns xml (html) to the sender as a response, after doing whatever else it was going to do. Check it out; send a page to be rendered instead of what's in the demo.
Dan
(03-24-2023, 07:15 PM)DanBarclay Wrote: [ -> ] (03-23-2023, 12:49 PM)matija Wrote: [ -> ]How can we implement show in one form my details articles?
I know an example from the pages!
THandlers.AddRootHandler('', '/', FormHandler)
with THandlers.Add('', '1', TContentForm.Create(TShopForm)) do
begin
CanStartSession := true;
RequiresSessionStart := false;
end;
Example:
http://localhost/shop/1 -> Details for article 1
http://localhost/shop/2 -> Details for article 2
http://localhost/shop/3 -> Details for article 3
Is there any demo?
If I recall, the ContentHandler demo does exactly what you may be asking about. It returns xml (html) to the sender as a response, after doing whatever else it was going to do. Check it out; send a page to be rendered instead of what's in the demo.
Dan
It is important to me what ID/Key of detail article read from adress bar of web browser?