Page 1 of 1

Modules and Pages

Posted: Fri Oct 03, 2008 5:31 am
by The-Forgotten
How can I create a Custom HTML page for Joomla.

Ex. I made a module for joomla with custom HTML code and I can't figure how to get that to work on it's own page without other stuff...help?

Re: Modules and Pages

Posted: Fri Oct 03, 2008 4:10 pm
by ooffick
Hi,

you could do that as follows:

create a file in your templates directory called module_only.php and use the following code for it:

Code: Select all

<?php 

// no direct access
defined( '_JEXEC' ) or die( 'Restricted access' );
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<?php echo $this->language; ?>" lang="<?php echo $this->language; ?>" dir="<?php echo $this->direction; ?>">
<head>
	<jdoc:include type="head" />
	<link rel="stylesheet" href="<?php echo $this->baseurl ?>/templates/<?php echo $this->template; ?>/css/template.css" type="text/css" />

<?php if($this->direction == 'rtl') : ?>
	<link rel="stylesheet" href="<?php echo $this->baseurl ?>/templates/<?php echo $this->template; ?>/css/template_rtl.css" type="text/css" />
<?php endif; ?>
</head>
<jdoc:include type="modules" name="this_module_only" style="xhtml"/> 
</body>
</html>
If you need the header and the footer as well, you might need to get that from your standard template.

You would call that page using the following additional parameter:

Code: Select all

http://www.your-domain.com/index.php?tmpl=module_only
And you would need to publish the Custom HTML Module in the position "this_module_only"

Let me know if that doesn't work,
Olaf

Re: Modules and Pages

Posted: Sat Oct 04, 2008 5:09 am
by The-Forgotten
Well I got the file created and labeled correctly.

The told the module to be placed in the this_module_only with custom HTML, but I didn't see a additional parameter section for it. Also how would I get that on the menu?

Sorry if I seem stupid but I am only 2 days into using Joomla

Re: Modules and Pages

Posted: Sat Oct 04, 2008 10:03 am
by ooffick
Just add the following parameter to the end of the link in the link field :

Code: Select all

&tmpl=module_only
Olaf

Re: Modules and Pages

Posted: Tue Oct 07, 2008 12:46 am
by The-Forgotten
Yeah, don't work....?

Re: Modules and Pages

Posted: Tue Oct 07, 2008 9:05 am
by ooffick
The-Forgotten wrote:Yeah, don't work....?
What happens instead? Did you create the file "module_only.php" ?
Do you have the URL to that page?

Olaf

Re: Modules and Pages

Posted: Tue Oct 07, 2008 5:35 pm
by The-Forgotten
Yeah I did everything above. When I put the link in I just get 404 errors and cannot find page...

Re: Modules and Pages

Posted: Tue Oct 07, 2008 6:48 pm
by ooffick
Do you have the URL for that page so I can have a look at it?

Olaf

Re: Modules and Pages

Posted: Wed Oct 08, 2008 3:41 am
by The-Forgotten
Yes ofcourse sorry, should have done that before: www.clan-finalsolution.com/index.php&tmpl=module_only

Re: Modules and Pages

Posted: Wed Oct 08, 2008 8:26 am
by ooffick
The URL would be:
http://www.clan-finalsolution.com/index ... odule_only
or
http://www.clan-finalsolution.com/index ... odule_only

However, you did a small mistake by creating the modul_only.php file.
I have attached that file in a zip archive for you. Please extract the file and upload the file to your server.

Olaf

Re: Modules and Pages

Posted: Thu Oct 09, 2008 5:06 am
by The-Forgotten
OK, I got the new file uploaded. I'll get the link fixed here too and hopfully it'll work. Thanks again for the help here

Re: Modules and Pages

Posted: Thu Oct 09, 2008 5:41 am
by The-Forgotten
So why do I get the white page?

Re: Modules and Pages

Posted: Thu Oct 09, 2008 10:28 am
by ooffick
The-Forgotten wrote:So why do I get the white page?
Did you publish a module to all pages in the position "this_module_only".

Olaf

Re: Modules and Pages

Posted: Thu Oct 09, 2008 7:59 pm
by The-Forgotten
Hey hey, it kinda works. But when it comes up 'this_module_only it ain't kiding. Thanks, I'll starting playing around with this a bit :D