Jump to content

Different template for one page


barvitual

Recommended Posts

Is it possible to set a different template than the default for one page only. I am creating a module, and need it to be set to a different template then my default template, for a page.

Thanks

Add the skin you created for your module to /lib/skins (if not change /lib/skins/SKIN_NAME/style.css to the location of the template being used.

This should work (I have not had a chance to test yet work)

I the header of the .tpl (or .php) page you are creating for you module add:

<link rel="stylesheet" href="<?php echo SITE_URL?>/lib/skins/SKIN_NAME/style.css" type="text/css" media="screen" />

Link to comment
Share on other sites

  • Administrators

You can use /action.php to go skinless and design the page how you would like. The template you call will have to include everything a normal web page would, head, html, etc.. but you will have phpVMS classes available as well.

example:

Create a controller with a template call

class Clean extends CodonModule {

function index()   {
      $this->show('mytemplate.tpl');
}
}

Then create a template called mytemplate.tpl and put a complete webpage in it. You can link to different css or whatever you would like.

Then link to it using action.php

<a href="<?php echo SITE_URL; ?>/action.php/clean">My Link</a>

You should have all the functionality of phpVMS classes available to you in the template as well.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...