Page 1 of 1

Using the same content block on different pages.

Posted: Mon Jul 07, 2008 9:49 am
by gavinhowells
Hi everyone,

First off, sorry everyone, I'm almost certain that this has been covered numerous times before on the forum but for the life of me I can't find any reference to it when using the search.  :( Maybe it's because I'm not sure what I'm searching for.

Basically, I have a content block, {content block='xyz'}, on my home page. I would like the content contained in that block to also appear on a few other pages throughout the site. Is there anyway of doing this without having to put {content block='xyz'} on each of the pages and then entering the same content in the CMS on each of those pages?

Thanks Guys and Girls

Gavin

::edit - I do realise I could use global content blocks but would like to keep the content in the pages section of the CMS, just so as not to confuse anyone updating.

Re: Using the same content block on different pages.

Posted: Mon Jul 07, 2008 11:50 am
by cyberman
gavinhowells wrote: Is there anyway of doing this without having to put {content block='xyz'} on each of the pages and then entering the same content in the CMS on each of those pages?
Move the global content block to the template and assign this template to those pages ...

Re: Using the same content block on different pages.

Posted: Mon Jul 07, 2008 1:07 pm
by gavinhowells
Yes, I'd thought about using Global Content Blocks but wanted to keep all the content confined to the 'pages' section of the CMS.

I thought there was another way of doing it, perhaps using 'assign' but maybe I'm mistaken.

Re: Using the same content block on different pages.

Posted: Mon Jul 07, 2008 3:47 pm
by Pierre M.
Hello,

if your are not happy with cyberman's templating suggestion, may be you could be interested by calguy1000's CGextensions module ? It could have a function to call a block of any page...

Pierre M.

Re: Using the same content block on different pages.

Posted: Tue Jul 08, 2008 5:01 am
by cyberman
Or maybe the ContentAlias module ...

Re: Using the same content block on different pages.

Posted: Tue Jul 08, 2008 8:21 am
by gavinhowells
cyberman wrote: Or maybe the ContentAlias module ...
Gave that a try, but it tells me that the maximum CMSMS Version Supported = 1.2.4 and I'm running 1.3  :(

Thanks for all your help though guys, it looks like i will go the content block route.

Re: Using the same content block on different pages.

Posted: Tue Jul 08, 2008 9:03 am
by alby
gavinhowells wrote:
cyberman wrote: Or maybe the ContentAlias module ...
Gave that a try, but it tells me that the maximum CMSMS Version Supported = 1.2.4 and I'm running 1.3  :(
From 1.3 there is Page Link Internal in Content Type

Alby

Re: Using the same content block on different pages.

Posted: Tue Jul 08, 2008 9:20 am
by cyberman
gavinhowells wrote:
cyberman wrote: Or maybe the ContentAlias module ...
Gave that a try, but it tells me that the maximum CMSMS Version Supported = 1.2.4 and I'm running 1.3   
The limit is a sometimes to strong handled feature (in my opinion), but you can change the limit.

Open the file contentaliases.module.php with an editor, find line 70

Code: Select all

	function MaximumCMSVersion()
	{
	return '1.2.4';
	}
and change it to

Code: Select all

	function MaximumCMSVersion()
	{
	return '1.4';
	}

Re: Using the same content block on different pages.

Posted: Tue Jul 08, 2008 2:15 pm
by gavinhowells
Cheers guys. You've really been helpful.  :)