leo
Administrator
Avatar
Posts: 6588
München, Germany
Unfortunately, there is a naming conflict in the listing module and memberlist module if page alias usage is disabled in the TYPOlight back end settings (see ticket 297). Therefore, the variable name that triggers the details page will be changed from "id" to "show", which affects the following templates:

  • mod_memberlist.tpl
  • list_default.tpl
  • all custom list_*.tpl templates

Current code:

iconphp:
<a href="<?php echo $this->url; ?>?id=<?php echo $col['id']; ?>">

New code:

iconphp:
<a href="<?php echo $this->url; ?>?show=<?php echo $col['id']; ?>">

I apologize for the trouble caused.
2008-12-05 19:57
leo
Administrator
Avatar
Posts: 6588
München, Germany
Another change affects the core extensions news and calendar. By now, some modules (e.g. the event list) store the unaltered record as $this->data, so you can use custom fields in the template. From version 2.6.3, all fields will be assigned in every module by default, so you do not need $this->data anymore.

Current code:

iconphp:
<?php $data = $this->data; echo $data['custom_field']; ?>

New code:

iconphp:
<?php echo $this->custom_field; ?>

This change only affects custom templates that use $this->data.
2008-12-06 13:09
leo
Administrator
Avatar
Posts: 6588
München, Germany
The third and probable last change affects custom page templates (fe_*.tpl). From version 2.6.3, the body tag will support class attributes that can be defined in the site structure (ever since) and the page layout (new). Thus, you can add CSS definitions that only apply to a particular page layout or a single page.

Current code:

iconphp:
<body<?php echo $this->onload; ?> id="top">

New code:

iconphp:
<body id="top"<?php echo $this->class . $this->onload; ?>>

Here is a small usage example:

iconCode:
Page A (Layout A with body class "layout_a")
  Page A1 (with CSS class "page_a1")
Page B (Layout B without body class)

If those pages are opened, the following body tags are shown:

iconCode:
<body id="top" class="layout_a">
<body id="top" class="layout_a page_a1">
<body id="top">

In your style sheet, you can now add a format definition that only applies to this very page using .layout_a .page_a1 {.
2008-12-06 14:20
Ben
TYPOlight partner
Avatar
Posts: 2061
Atlanta, Georgia, United States
Leo,

This is a brilliant feature! This will save me from having a custom css file per template. I often find myself defining unique values for #main / #right / #header based on the temple. Now we can define them all in one css.
Ben - "I live for live updates."
{follow me on twitter}
{follow TYPOlight on twitter}
2008-12-07 06:26
davidm
TYPOlight novice
Avatar
Posts: 82
Paris, France
Indeed very nice, so far I have I used

iconCode:
<body<?php echo $this->onload; ?> id="{‎{env::page_alias}}">

to do what ben suggest (assign different values to layout elements depending on the page)

But this will be cleaner and less complex to manage :thumbup:
++ open source enthusiast, textpattern and modx veteran, typolight student ++

.: loving typolight's versatility and flexibility, impressed by reliability and security and enjoying fast development time :.

++ amazed by the Catalog/CatalogExt/Taxonomy combo and lots of high quality modules... kudos ! +++
2008-12-07 11:12
fbliss
TYPOlight partner
Avatar
Posts: 476
Northampton, United States
Very well done, Leo. Thank you very much!
Come to the light... Typolight.
2008-12-14 19:01
Total Members: 4321 Total Topics: 11070 Total Messages: 78429