template inheritance and default content

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
User avatar
rotezecke
Power Poster
Power Poster
Posts: 411
Joined: Fri Apr 18, 2008 9:34 pm

template inheritance and default content

Post by rotezecke »

i started playing with template inheritance and am trying to move my default {content} block to a different tab (in admin).

the master has this:

Code: Select all

{block name="top"}
{content label="Main Content of Page - cannot be empty" assign=bigContentBlock}
{/block}
the below does not work, but it explains the idea (for sub-templates):

Code: Select all

{block name="top"}
{content label="Main Content of Page - cannot be empty" assign=bigContentBlock tab=options} 
{/block}
Is this at all possible?


----------------------------------------------

Cms Version: 1.11.10

Installed Modules:

CMSMailer: 5.2.2
MenuManager: 1.8.6
News: 2.14.2
CGSmartImage: 1.16.1
Search: 1.7.11
TinyMCE: 2.9.12
CGSimpleSmarty: 1.7.2
CGExtensions: 1.38.6
CGBlog: 1.12.1
CGFeedback: 1.6.5
Captcha: 0.4.6
FormBuilder: 0.7.3
Showtime: 3.4
JQueryTools: 1.2.6
GBFilePicker: 1.3.3


Config Information:

php_memory_limit:
process_whole_template:
max_upload_size: 2000000
url_rewriting: mod_rewrite
page_extension: .html
query_var: page
image_manipulation_prog: GD
auto_alias_content: true
locale:
default_encoding: utf-8
admin_encoding: utf-8
set_names: true


Php Information:

phpversion: 5.4.4-14+deb7u9
md5_function: On (True)
gd_version: 2
tempnam_function: On (True)
magic_quotes_runtime: Off (False)
E_STRICT: 2048
E_DEPRECATED: 8192
memory_limit: 128M
max_execution_time: 30
output_buffering: 4096
safe_mode: Off (False)
file_uploads: On (True)
post_max_size: 8M
upload_max_filesize: 2M
session_save_path: /tmp (1777)
session_use_cookies: On (True)
xml_function: On (True)
xmlreader_class: On (True)


Server Information:

Server Api: apache2handler
Server Db Type: MySQL (mysql)
Server Db Version: 5.5.37
Server Db Grants: Found a "GRANT ALL" statement that appears to be suitable
Server Time Diff: No filesystem time difference found


----------------------------------------------
User avatar
velden
Dev Team Member
Dev Team Member
Posts: 3497
Joined: Mon Nov 28, 2011 9:29 am

Re: template inheritance and default content

Post by velden »

In CMSMS 1 this is not possible as far as I know.

The 'problem' is that CMSMS requires every template to have at least the default content content block {content}.

So your 'base' template must include that. Every template that inherits from this base template can NOT override that default {content} block.

From what I've 'heard' CMSMS 2.0 - which is in beta now - does not require require the default content block, which makes it possible to 'declare' different setups of {content} for sub templates.

Though I'm interested in this possibility I did not test it yet myself.
Post Reply

Return to “CMSMS Core”