[Solved] Same content on multiple pages
[Solved] Same content on multiple pages
Hi,
is there a way (or a tag) that can make me display the {content} from a specific page on another? Without using Global Content Blocks. So i can just specify the alias of a certain page and display that on another page.
Cheers
is there a way (or a tag) that can make me display the {content} from a specific page on another? Without using Global Content Blocks. So i can just specify the alias of a certain page and display that on another page.
Cheers
Last edited by volcanoboy on Wed Jul 13, 2011 6:33 am, edited 1 time in total.
Re: Same content on multiple pages
Change the content type when creating a new page
Re: Same content on multiple pages
hmm...Not enterily sure what you mean. What should I change the Content Type to?
Basicly I have a very stripped down version of the website without all the styling an images and would just like it to pull what's in the {content} block on another page on this one.
Basicly I have a very stripped down version of the website without all the styling an images and would just like it to pull what's in the {content} block on another page on this one.
Re: Same content on multiple pages
I was thinking of content type "Internal Page Link", but that might not be what you were looking for.
I think the CGSimpleSmarty module will suit your needs.
I think the CGSimpleSmarty module will suit your needs.
Re: Same content on multiple pages
Yes, quite easy using CGSimpleSmarty:
get_page_content($alias[,$block][,$assign])
get_page_content($alias[,$block][,$assign])
Re: Same content on multiple pages
hey,
I'm really trying to get my head around this. I've used the module on other parts of the page and they are working as intended. But this one I just can't get to work. I've tried all these:
I guess there is something missing in my tag? I'm not getting errors but I'm not getting any content either.
What I'm trying to do is to have the content of a page with alias "om-oss" showing in the content block of a page with page alias "hovedside". Hope you can help me out with this one.
I'm really trying to get my head around this. I've used the module on other parts of the page and they are working as intended. But this one I just can't get to work. I've tried all these:
Code: Select all
</br>{$cgsimple->get_page_content($om-oss)}
</br>{$cgsimple->get_page_content('om-oss','content')}
</br>{$cgsimple->get_page_content($om-oss,$block,$assign)}
</br>{$cgsimple->get_page_content('$om-oss','content')}
</br>{$cgsimple->get_page_content('$om-oss','$block')}
</br>{$cgsimple->get_page_content($om-oss,$content)}
What I'm trying to do is to have the content of a page with alias "om-oss" showing in the content block of a page with page alias "hovedside". Hope you can help me out with this one.
Re: Same content on multiple pages
Code: Select all
{$cgsimple->get_page_content('om-oss')}
Re: Same content on multiple pages
thanks that works when I put it in my template. Is it possible to put these in content boxes? I get errors when I do.
Also another problem is that if I put this in my template and my om-oss page have global content blocks it just prints out the name of that content block instead of the content.
Any way to avoid that?
Also another problem is that if I put this in my template and my om-oss page have global content blocks it just prints out the name of that content block instead of the content.
Any way to avoid that?
Re: Same content on multiple pages
There is an example in the help page that comes with CGSimpleSmarty, to use the eval function
You can copy/paste this in your page template and see what it does:
You can copy/paste this in your page template and see what it does:
Code: Select all
{content block='extracontentalias' label='page alias for extra content' oneline='true' assign='extracontentalias'}
{if !empty($extracontentalias)}
{$cgsimple->get_page_content($extracontentalias,'','extracontent')}
{eval var=$extracontent}
{/if}
Re: Same content on multiple pages
thanks. That works great 
I'm abit blank when it comes to these things.
But it's not possible to use cgsimple in normal content blocks is it? It has to be in the actual template?
Thanks again

I'm abit blank when it comes to these things.
But it's not possible to use cgsimple in normal content blocks is it? It has to be in the actual template?
Thanks again
