Different template for each content or page

For questions and problems with the CMS core. This board is NOT for any 3rd party modules, addons, PHP scripts or anything NOT distributed with the CMS made simple package itself.
Post Reply
MyHacks
Forum Members
Forum Members
Posts: 30
Joined: Wed Jun 17, 2009 2:45 pm

Different template for each content or page

Post by MyHacks »

Hi!

How can I do that?

Thanks :D
User avatar
Nullig
Power Poster
Power Poster
Posts: 2380
Joined: Fri Feb 02, 2007 4:31 pm
Location: Comox Valley, BC

Re: Different template for each content or page

Post by Nullig »

Yes.
MyHacks
Forum Members
Forum Members
Posts: 30
Joined: Wed Jun 17, 2009 2:45 pm

Re: Different template for each content or page

Post by MyHacks »

What does 'yes' means?

did I miss something here..  ???
RonnyK
Support Guru
Support Guru
Posts: 4962
Joined: Wed Oct 25, 2006 8:29 pm
Location: Raalte, the Netherlands

Re: Different template for each content or page

Post by RonnyK »

You can select the template to which a page is attached.

When creating/editing a page, there is a pulldown, called template.... That is the template for that specific page.

What are you trying to achieve that requires another template for every other page?

Ronny
MyHacks
Forum Members
Forum Members
Posts: 30
Joined: Wed Jun 17, 2009 2:45 pm

Re: Different template for each content or page

Post by MyHacks »

I want to have 5 section in main page and only 3 section in page 1, 2 section in page 2 and so on.

What will happen if I use "Set All Pages" in specific template in layout menu? will all pages get overridden?
RonnyK
Support Guru
Support Guru
Posts: 4962
Joined: Wed Oct 25, 2006 8:29 pm
Location: Raalte, the Netherlands

Re: Different template for each content or page

Post by RonnyK »

Set all pages, means that ALL pages will be attached to that template.... That is usefull when you modified a copy of the current template, and want to push all pages using the new template....

So basically, you can make multiple templates, and choose per page to what template it should be attached...

Ronny
MyHacks
Forum Members
Forum Members
Posts: 30
Joined: Wed Jun 17, 2009 2:45 pm

Re: Different template for each content or page

Post by MyHacks »

Hi RonnyK,

Thank you for your reply. I wonder is it possible to do something with the pages.
The front page will have 3 sections, then after I click a link to the one of the pages those sections will be replaced with the page content but the header remains visible. What is the best way to do that?
Here is the illustration:
Image

:)
Last edited by MyHacks on Fri Jul 10, 2009 4:31 pm, edited 1 time in total.
User avatar
Nullig
Power Poster
Power Poster
Posts: 2380
Joined: Fri Feb 02, 2007 4:31 pm
Location: Comox Valley, BC

Re: Different template for each content or page

Post by Nullig »

Use 2 templates - one for the front page with 3 divs in the content area (or 3 content blocks) and one for the rest of the pages with only one div in the content area (1 content block).

Nullig

P.S. sorry for my first response - I thought I was answering another post.
MyHacks
Forum Members
Forum Members
Posts: 30
Joined: Wed Jun 17, 2009 2:45 pm

Re: Different template for each content or page

Post by MyHacks »

Wow it works!

I feel very good now. :D

I do still have a problem about 'section', Is it possible to have one permanent section that can be edited from admin control panel, for example, content/page that always shown at any condition?
So the summary is, this section/ block can be edited via admin control panel and always shown.
User avatar
Nullig
Power Poster
Power Poster
Posts: 2380
Joined: Fri Feb 02, 2007 4:31 pm
Location: Comox Valley, BC

Re: Different template for each content or page

Post by Nullig »

You can use Global Content Blocks for that...

http://wiki.cmsmadesimple.org/index.php ... ent_Blocks

Nullig
MyHacks
Forum Members
Forum Members
Posts: 30
Joined: Wed Jun 17, 2009 2:45 pm

Re: Different template for each content or page

Post by MyHacks »

Hi Nullig,

I got something called "Page Blocks". Is that can be classified to my needs?
The module is cgsimplesmarty. Is this module can help me to put a page section/block that can be edited using WYSIWYG (tinyMCE)? Sorry, this is just my guess.
jmcgin51
Power Poster
Power Poster
Posts: 1899
Joined: Mon Jun 12, 2006 9:02 pm

Re: Different template for each content or page

Post by jmcgin51 »

Page Blocks are different from Global Content Blocks.  Global Content Blocks are found in Content > Global Content Blocks.
MyHacks
Forum Members
Forum Members
Posts: 30
Joined: Wed Jun 17, 2009 2:45 pm

Re: Different template for each content or page

Post by MyHacks »

Sorry if this sounds very noob, what are the differences between them?

Both of them can be used to create additional "blocks", am I right?
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am
Location: Arizona

Re: Different template for each content or page

Post by Dr.CSS »

GCB is a core part of CMS Made Simple Page blocks is a third party module which may not work in newer versions of cmsms...
Post Reply

Return to “CMSMS Core”