Hello,
I would like to reuse some contents of some content pages on the same website (global content blocks are not quite appropriate for that). How do I do this? Is it possible to use the content-function with special parameters?
However, this does not work:
{content page='28'}
[solved] Re-using contents on the same website (avoiding redundancy)
[solved] Re-using contents on the same website (avoiding redundancy)
Last edited by ottom on Sun Oct 05, 2008 4:14 pm, edited 1 time in total.
Re: Re-using contents on the same website (avoiding redundancy)
View PageLinks contenttype (for alias page) or CGSimpleSmarty moduleottom wrote: I would like to reuse some contents of some content pages on the same website (global content blocks are not quite appropriate for that). How do I do this? Is it possible to use the content-function with special parameters?
However, this does not work:
{content page='28'}
Alby
Re: Re-using contents on the same website (avoiding redundancy)
Hi Alby,
Do you mean with PageLinks just placing an external link to an existing page? I want to use different templates for the same content, thus this would not work.
I have installed CGSimpleSmarty. For the first experiment I have just pasted on a content page {$cgsimple->get_page_content(home)}. The alias of the start page is "home" indeed. However, I get an error:
Do you mean with PageLinks just placing an external link to an existing page? I want to use different templates for the same content, thus this would not work.
I have installed CGSimpleSmarty. For the first experiment I have just pasted on a content page {$cgsimple->get_page_content(home)}. The alias of the start page is "home" indeed. However, I get an error:
Du you have an experience with that? I am using CMSMS v1.4 by the way.string(160) "Smarty error: [in preview:cmspreviewK63fQx line 100]: syntax error: unrecognized tag: $cgsimple->get_page_content(home) (Smarty_Compiler.class.php, line 446)" string(125) "Smarty error: [in preview:cmspreviewK63fQx line 100]: syntax error: unrecognized tag '' (Smarty_Compiler.class.php, line 590)"
Re: Re-using contents on the same website (avoiding redundancy)
No, external and internal link but you cannot use an other templateottom wrote: Do you mean with PageLinks just placing an external link to an existing page? I want to use different templates for the same content, thus this would not work.
Maybe {$cgsimple->get_page_content('home')} is betterottom wrote: I have installed CGSimpleSmarty. For the first experiment I have just pasted on a content page {$cgsimple->get_page_content(home)}. The alias of the start page is "home" indeed. However, I get an error:

Alby
Re: Re-using contents on the same website (avoiding redundancy)
Unfortunatelly this does not work either for '...':

The same is true for "...":string(162) "Smarty error: [in preview:cmspreviewrsTjN5 line 100]: syntax error: unrecognized tag: $cgsimple->get_page_content('home') (Smarty_Compiler.class.php, line 446)" string(125) "Smarty error: [in preview:cmspreviewrsTjN5 line 100]: syntax error: unrecognized tag '' (Smarty_Compiler.class.php, line 590)"
string(162) "Smarty error: [in preview:cmspreviewA0Ncj3 line 100]: syntax error: unrecognized tag: $cgsimple->get_page_content("home") (Smarty_Compiler.class.php, line 446)" string(125) "Smarty error: [in preview:cmspreviewA0Ncj3 line 100]: syntax error: unrecognized tag '' (Smarty_Compiler.class.php, line 590)"

Re: Re-using contents on the same website (avoiding redundancy)
But you display in preview or in site?ottom wrote:string(162) "Smarty error: [in preview:cmspreviewrsTjN5 line 100]: syntax error: unrecognized tag: $cgsimple->get_page_content('home') (Smarty_Compiler.class.php, line 446)" string(125) "Smarty error: [in preview:cmspreviewrsTjN5 line 100]: syntax error: unrecognized tag '' (Smarty_Compiler.class.php, line 590)"
Alby
Re: Re-using contents on the same website (avoiding redundancy)
preview or live: both.
The difference is just the place where the error is displayed. In preview mode the message appears on top of the page outside the layout. When published, it appears instead of the contents inside the layout.
The difference is just the place where the error is displayed. In preview mode the message appears on top of the page outside the layout. When published, it appears instead of the contents inside the layout.
Re: Re-using contents on the same website (avoiding redundancy)
Hey Ottom,
probably the content dump plug-in could help you: http://dev.cmsmadesimple.org/projects/contentdump/ Part of its intention is to re-use content in different places.
Best
Nils
probably the content dump plug-in could help you: http://dev.cmsmadesimple.org/projects/contentdump/ Part of its intention is to re-use content in different places.
Best
Nils
Re: Re-using contents on the same website (avoiding redundancy)
$cgsimple->get_page_content('home') and $cgsimple->get_page_content(home) actually does work but not within content of a page. I could create a simple plug-in which uses this code to get content from another page and use {myplugin page=home} in the content.