Jump to content

Create a new Skin Template File


Claudia M

Recommended Posts

Of various methods, the simplest way I see two steps:

1. Create your template. Name it anything (usually content.whatever.php). Put it in the /templates/ folder.

2. For now, you will need to manually edit the /classes/cubecart.class.php file.

The URL will be index.php?_a=whatever.

	/**
	 * Whatever
	 */
	private function _whatever() {

		// Do whatever Whatever does
		$whatever = $data_gathered_and_processed;
		$GLOBALS['smarty']->assign('WHATEVER', $whatever);

		$GLOBALS['gui']->addBreadcrumb("Whatever", currentPage());
		$GLOBALS['smarty']->assign('SECTION_NAME', 'whatever');

		$content = $GLOBALS['smarty']->fetch('templates/content.whatever.php');
		$GLOBALS['smarty']->assign('PAGE_CONTENT', $content);
	}

Everything in the code is necessary. The code that actually gets data, processes that data, as much of that data as is necessary, is performed in the first section of statements.

Add the above to the bottom of /classes/cubecart.class.php, just above the last closing brace.

There should be hook to make this work as it should, but there isn't one - yet.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...