Custom pages?

For Joomla! 1.5 Coding related discussions, please use: http://groups.google.com/group/joomla-dev-general
Locked
mrpiper
Joomla! Apprentice
Joomla! Apprentice
Posts: 6
Joined: Mon Jun 13, 2011 9:23 am

Custom pages?

Post by mrpiper » Mon Jun 13, 2011 9:32 am

Hi there,

I've just had my design turned into a Joomla! based website. All the pages run off the index.php with different variables for each page.

On the media page I want the layout to be slightly different with it not having the sidebar content so I can fill the page with pictures. So I thought the logical thing to do would be to duplicate the index.php and call it media.php, modify the code so it looses the sidebar content and link it to a modified layout.css which allows the articles to use the full width of the page.

If this is a good way of doing it how do I select my custom page from the menu menu manager because at the moment I can only select pages which are articles.

The site is : www.bellowhead.co.uk/bellowhead

Thanks in advance

James

User avatar
RussW
Joomla! Exemplar
Joomla! Exemplar
Posts: 9347
Joined: Sun Oct 22, 2006 4:42 am
Location: Sunshine Coast, Queensland, Australia
Contact:

Re: Custom pages?

Post by RussW » Mon Jun 13, 2011 10:10 am

hmmmm, noooo... the logical thing to do would be to make ue of the CMS, instead of trying to cpoy files and treat it like and manually modified and managed file.

Just disable the modules you dont wish to be displayed on the "media" page, which would be a menu item somewhere.
Joomla! on the fabulous Sunshine Coast...
hotmango, web & print http://www.hotmango.me/
The Styleguyz https://www.thestyleguyz.com/

mrpiper
Joomla! Apprentice
Joomla! Apprentice
Posts: 6
Joined: Mon Jun 13, 2011 9:23 am

Re: Custom pages?

Post by mrpiper » Mon Jun 13, 2011 12:22 pm

Thanks for the reply Russ.

I thought this might be the case - I have been able to disable the modules for the specific page but it then just leaves a gap where they were as the left column (main content area) div is a fixed width...

Also - eventhough the modules are disabled the column they appear in stays also taking up space...

Any ideas?

Cheers pal

James

User avatar
Per Yngve Berg
Joomla! Master
Joomla! Master
Posts: 30891
Joined: Mon Oct 27, 2008 9:27 pm
Location: Romerike, Norway

Re: Custom pages?

Post by Per Yngve Berg » Mon Jun 13, 2011 2:00 pm

Use this code in the template. When no modules are published in the position, the wrapping div is also not there.

Code: Select all

             <?php if ($this->countModules( 'top-poster' )) : ?>          
                   <div class="poster">
                       <jdoc:include type="modules" name="top-poster" style="xhtml" />
                   </div>			
              <?php endif; ?>

mrpiper
Joomla! Apprentice
Joomla! Apprentice
Posts: 6
Joined: Mon Jun 13, 2011 9:23 am

Re: Custom pages?

Post by mrpiper » Mon Jun 13, 2011 2:13 pm

Thanks!

So what if the all the modules are all contained within a 'right column' div and the left column has a defined width?

having this php code will make the div's they are in not appear but im still stuck with the defined width of the left column and the space the right column is taking up.

Or could I use the above php code around the whole right column and set the left column to 100% width?

cheers

J

User avatar
Per Yngve Berg
Joomla! Master
Joomla! Master
Posts: 30891
Joined: Mon Oct 27, 2008 9:27 pm
Location: Romerike, Norway

Re: Custom pages?

Post by Per Yngve Berg » Mon Jun 13, 2011 2:23 pm

mrpiper wrote:Or could I use the above php code around the whole right column and set the left column to 100% width?
That usually works, unless your template is contructed in an odd way.


Locked

Return to “Joomla! 1.5 Coding”