Page 1 of 1

Re-Position SHOW_CONTENT code higher up in content.func.inc.

Posted: Mon 14. May 2007, 18:06
by jsw_nz
Just wanted to bring this up
- likely that Oliver would like to consider this
- had a situation where I wanted to have footer material 'update-able'
- so used the SHOW_CONTENT tag.

The contentpart itself used other
common reptags including
[BACK],[PRINT],[BOOKMARK],[TOP]
yet these were not being rendered....

Found that re-positioning the SHOW_CONTENT code
higher in the content.func.inc.php code
these tags would properly get rendered....

I moved it up to line 468 and it now works:

Code: Select all

// {SHOW_CONTENT:MODE,id[,id[,...]]}
if( ! ( strpos($content["all"],'{SHOW_CONTENT:')===false ) ) {
	$content["all"] = preg_replace('/\{SHOW_CONTENT:(.*?)\}/e', 'showSelectedContent("$1");', $content["all"]);
}
Not sure if this conflicts with other functionality - to me it seems to be OK
- so just making this a suggestion...
:)

Posted: Mon 14. May 2007, 21:32
by Jensensen
Hi jsw_nz,

so far I didn't checked the code or even tried but, to change footer my spontaneous idea is to work with snippets and to include using php:

<?php require("MyFooterTemplates/footer01.tpl"); ?>


why don't use
{footer} [in combination with {SHOW_CONTENT} ] or
layout templates in combination with {SHOW_CONTENT} ??


greetz

ps: however and as described above, seems to be a remarkable discovery programmers [should] have a closer look at...

Posted: Mon 14. May 2007, 23:26
by jsw_nz
Hi Jensensen,

Thanks for the reply, to respond
<?php require("MyFooterTemplates/footer01.tpl"); ?>
yes, that would be good way - however I had in mind editing content directly inside wcms backend - having said that IF in the future *.tmpl could be edited directly from backend, that would be nice. Since OliG is starting to provide template options for a lot of contentparts - the idea to create means to edit them is a good one - methinks - I really particularly like the plaintext template options - create way to embed text wrapped in class-based div's - easier than wysiwyg option.
why don't use
{footer} [in combination with {SHOW_CONTENT} ] or
layout templates in combination with {SHOW_CONTENT} ??
guessing that might present the same issues I discussed - although not sure.

Anyway thanks - perhaps OliG could comment on these issues

All the best
i enjoy your posts
:)

Posted: Tue 15. May 2007, 02:32
by Jensensen
[x]

Posted: Tue 15. May 2007, 23:22
by Oliver Georgi
did it - makes sense.

Oliver