Admin page without admin furniture [solved]

Talk about writing modules and plugins for CMS Made Simple, or about specific core functionality. This board is for PHP programmers that are contributing to CMSMS not for site developers
Post Reply
cowtan
Forum Members
Forum Members
Posts: 70
Joined: Mon Jan 19, 2009 5:04 pm

Admin page without admin furniture [solved]

Post by cowtan »

Hi - I'm starting development of my first module. It will have very simple functionality and doesn't have any front-end functionality.

Essentially, it will display a list of orders that have been made (via Foxycart), allowing an admin to view the orders and print out details to be included in a package slip.

I'm making slow but steady progress on how to do this but I'm not sure how to create the page which gets printed out. I can pull the information out of the database and display it on a page but I want to be able to display it in a pop-up window without any of the usual CMSMS furniture (ie menus, header, footer etc).

Usual apologies in advance if I've posted this in the wrong place, it doesn't make sense or the answer is blindingly obvious.

thanks,
Gordon
Last edited by cowtan on Thu May 05, 2011 6:41 pm, edited 1 time in total.
Duketown

Re: Admin page without admin furniture

Post by Duketown »

cowtan,

I have found (FPDF) to be of great help in these situations. In your case it could be handy to later send invoice or something.
So the flow would be: request the package slip to be prepared and once prepared display it automatically (in new window/tab) and print is.

Using PDF is one solution, there are bound to be more alternatives.

Duketown
cowtan
Forum Members
Forum Members
Posts: 70
Joined: Mon Jan 19, 2009 5:04 pm

Re: Admin page without admin furniture

Post by cowtan »

Thanks Duketown. I'm actually happy creating the page in HTML (I have the layout from the previous site which I can use). But thanks for the suggestion anyway.

Gordon
Jos
Support Guru
Support Guru
Posts: 4019
Joined: Wed Sep 05, 2007 8:03 pm
Location: The Netherlands

Re: Admin page without admin furniture

Post by Jos »

I found a post from NaN on a completely different subject, but maybe it helps you:
NaN wrote:I would create a link using the CMSms module API passing urlonly=true that will link to a certain module action:

Code: Select all


$myActionUrl = $this->CreateLink($id, 'myAction', $returnid, 'click me', array('disable_theme'=>true','showtemplate'=>'false', ... ),'', true);

This will create a link that processes your module action. So you don't need to instanciate anything.
The params 'disable_theme'=>true' and 'showtemplate'=>'false' causes the CMS to not render anything else but just your module output. (no template in frontend, no backend theme)
So you could play around with params 'disable_theme'=>true' and 'showtemplate'=>'false'

I found another parameter for CreateLink $targetcontentonly in the module API
http://www.cmsmadesimple.org/apidoc/CMS ... CreateLink
I don't know what that does, but you might want to try that one too.
cowtan
Forum Members
Forum Members
Posts: 70
Joined: Mon Jan 19, 2009 5:04 pm

Re: Admin page without admin furniture [solved]

Post by cowtan »

Thanks Jos, that looks like exactly what I was after. Much appreciated.

cheers,
Gordon
Post Reply

Return to “Developers Discussion”