Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2015-05-19 19:36:36

ruud
Developer emeritus
From: a galaxy far far away
Registered: 2006-06-04
Posts: 5,068
Website

rvm_inherit 0.3

rvm_inherit 0.3

This plugin makes it possible to use template inheritance and should work in TXP 4.5.7 and above.

Download

Report problems or ask questions about this version of the plugin here in this topic please, but please read the plugin help before asking!

Offline

#2 2015-05-20 08:25:51

etc
Developer
Registered: 2010-11-11
Posts: 2,947
Website

Re: rvm_inherit 0.3

Nice one! Had no much time to test it, but:

  • Help needs some brush up: <txp:rvm_inherit /> … should contain only <txp:rvm_block>, <txp:rvm_child> and/or <txp:rvm_parent> tags is in contradiction with
<txp:rvm_inherit page="default">
    <txp:rvm_block name="header">
        this is some header content
    </txp:rvm_block>
    this is the body content.
</txp:rvm_inherit>
  • unclosed <txp:rvm_block> in “Getting started” example (body?)
  • I would parse the default page if neither page nor form are set
  • this results in an infinite loop:
    <txp:rvm_block name="header">
        this is some header content
        <txp:rvm_block name="header" />
    </txp:rvm_block>

etc_[ query | search | pagination | date | tree | cache ]

Offline

#3 2015-05-20 11:33:37

ruud
Developer emeritus
From: a galaxy far far away
Registered: 2006-06-04
Posts: 5,068
Website

Re: rvm_inherit 0.3

Thanks. Those should all be fixed in version 0.2.

Offline

#4 2015-05-20 13:01:57

maniqui
Moderator
From: Buenos Aires, Argentina
Registered: 2004-10-10
Posts: 3,070
Website

Re: rvm_inherit 0.3

Haven’t tested it yet, but nice one, ruud. Thanks!
You may recall that we talked about this in the past .


La música ideas portará y siempre continuará

TXP Builders – finely-crafted code, design and txp

Offline

#5 2015-05-21 09:32:28

etc
Developer
Registered: 2010-11-11
Posts: 2,947
Website

Re: rvm_inherit 0.3

It remains to replace file with page in <txp:rvm_inherit file="default"> (“Nesting blocks” section), though v.0.2 works as is :) I’m sure it can change the way we work with conditional tags, and improve the code readability.


etc_[ query | search | pagination | date | tree | cache ]

Offline

#6 2015-05-21 13:32:18

ruud
Developer emeritus
From: a galaxy far far away
Registered: 2006-06-04
Posts: 5,068
Website

Re: rvm_inherit 0.3

Thanks again for reading it so thorougly. Fixed in version 0.3

Offline

#7 2015-05-21 13:33:41

philwareham
Core designer
From: Farnham, Surrey, UK
Registered: 2009-06-11
Posts: 3,092
Website

Re: rvm_inherit 0.3

Any chance your plugins will be put onto GitHub at some point, Ruud?

Offline

#8 2015-05-21 13:56:06

ruud
Developer emeritus
From: a galaxy far far away
Registered: 2006-06-04
Posts: 5,068
Website

Re: rvm_inherit 0.3

Perhaps. I don’t really see any advantages in using Github for relatively small projects such as my plugins. Chances my website going offline are smaller than such a central code repository shutting down (like Google Code).

Offline

#9 2015-05-21 14:38:38

candyman
Member
From: Italy
Registered: 2006-08-08
Posts: 684

Re: rvm_inherit 0.3

Can you post an example of a standard TXP layout side by side to the new inherited one?

Just to understand how does it work.

The benefits should be a better readibility or also a faster theme develpoment?

Offline

#10 2015-05-21 14:50:07

ruud
Developer emeritus
From: a galaxy far far away
Registered: 2006-06-04
Posts: 5,068
Website

Re: rvm_inherit 0.3

A standard TXP layout would probably have a lot more <txp:if_section> tags than one that uses an inherited template. How it works is documented in the plugin help. You’ll have to decide for yourself if using inherited templates is more in line with how you prefer to work, because this is just another way of doing things.

Offline

Board footer

Powered by FluxBB