Modules and Pages

General questions relating to Joomla! 1.5 There are other boards for more specific help on Joomla! features and extensions.

Moderator: General Support Moderators

Forum rules
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting.
Forum Post Assistant - If you are serious about wanting help, you should use this tool to help you post.
Locked
The-Forgotten
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 170
Joined: Thu Oct 02, 2008 6:16 am
Location: Milton, VT
Contact:

Modules and Pages

Post by The-Forgotten » Fri Oct 03, 2008 5:31 am

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?
Working with Joomla since 2008!

User avatar
ooffick
Joomla! Master
Joomla! Master
Posts: 11371
Joined: Thu Jul 17, 2008 3:10 pm
Location: Ireland
Contact:

Re: Modules and Pages

Post by ooffick » Fri Oct 03, 2008 4:10 pm

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
Olaf Offick - Global Moderator
learnskills.org

The-Forgotten
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 170
Joined: Thu Oct 02, 2008 6:16 am
Location: Milton, VT
Contact:

Re: Modules and Pages

Post by The-Forgotten » Sat Oct 04, 2008 5:09 am

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
Working with Joomla since 2008!

User avatar
ooffick
Joomla! Master
Joomla! Master
Posts: 11371
Joined: Thu Jul 17, 2008 3:10 pm
Location: Ireland
Contact:

Re: Modules and Pages

Post by ooffick » Sat Oct 04, 2008 10:03 am

Just add the following parameter to the end of the link in the link field :

Code: Select all

&tmpl=module_only
Olaf
Olaf Offick - Global Moderator
learnskills.org

The-Forgotten
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 170
Joined: Thu Oct 02, 2008 6:16 am
Location: Milton, VT
Contact:

Re: Modules and Pages

Post by The-Forgotten » Tue Oct 07, 2008 12:46 am

Yeah, don't work....?
Working with Joomla since 2008!

User avatar
ooffick
Joomla! Master
Joomla! Master
Posts: 11371
Joined: Thu Jul 17, 2008 3:10 pm
Location: Ireland
Contact:

Re: Modules and Pages

Post by ooffick » Tue Oct 07, 2008 9:05 am

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
Olaf Offick - Global Moderator
learnskills.org

The-Forgotten
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 170
Joined: Thu Oct 02, 2008 6:16 am
Location: Milton, VT
Contact:

Re: Modules and Pages

Post by The-Forgotten » Tue Oct 07, 2008 5:35 pm

Yeah I did everything above. When I put the link in I just get 404 errors and cannot find page...
Working with Joomla since 2008!

User avatar
ooffick
Joomla! Master
Joomla! Master
Posts: 11371
Joined: Thu Jul 17, 2008 3:10 pm
Location: Ireland
Contact:

Re: Modules and Pages

Post by ooffick » Tue Oct 07, 2008 6:48 pm

Do you have the URL for that page so I can have a look at it?

Olaf
Olaf Offick - Global Moderator
learnskills.org

The-Forgotten
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 170
Joined: Thu Oct 02, 2008 6:16 am
Location: Milton, VT
Contact:

Re: Modules and Pages

Post by The-Forgotten » Wed Oct 08, 2008 3:41 am

Yes ofcourse sorry, should have done that before: www.clan-finalsolution.com/index.php&tmpl=module_only
Working with Joomla since 2008!

User avatar
ooffick
Joomla! Master
Joomla! Master
Posts: 11371
Joined: Thu Jul 17, 2008 3:10 pm
Location: Ireland
Contact:

Re: Modules and Pages

Post by ooffick » Wed Oct 08, 2008 8:26 am

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
You do not have the required permissions to view the files attached to this post.
Olaf Offick - Global Moderator
learnskills.org

The-Forgotten
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 170
Joined: Thu Oct 02, 2008 6:16 am
Location: Milton, VT
Contact:

Re: Modules and Pages

Post by The-Forgotten » Thu Oct 09, 2008 5:06 am

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
Working with Joomla since 2008!

The-Forgotten
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 170
Joined: Thu Oct 02, 2008 6:16 am
Location: Milton, VT
Contact:

Re: Modules and Pages

Post by The-Forgotten » Thu Oct 09, 2008 5:41 am

So why do I get the white page?
Working with Joomla since 2008!

User avatar
ooffick
Joomla! Master
Joomla! Master
Posts: 11371
Joined: Thu Jul 17, 2008 3:10 pm
Location: Ireland
Contact:

Re: Modules and Pages

Post by ooffick » Thu Oct 09, 2008 10:28 am

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
Olaf Offick - Global Moderator
learnskills.org

The-Forgotten
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 170
Joined: Thu Oct 02, 2008 6:16 am
Location: Milton, VT
Contact:

Re: Modules and Pages

Post by The-Forgotten » Thu Oct 09, 2008 7:59 pm

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
Working with Joomla since 2008!


Locked

Return to “General Questions/New to Joomla! 1.5”