Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2016-01-20 13:59:08

Destry
Moderator
From: Haut-Rhin
Registered: 2004-08-04
Posts: 4,021
Website

rah_flat (template file extensions)

I’m still kind of new to rah_flat, but it seems to output templates with extension .txp. Is there a reason for that, instead of having something more useful like .textile? Every time I have to edit a template, TextMate doesn’t like it, and understandably so. If the extension was .textile, TextMate would immediately throw the appropriate bundle on it and that would be nice. Can that be changed? Even better, I suppose, would be a preference for the plugin that allows you to choose what extension you want to use, so that one could more easily edit in .md, .txt, .textile, or whatever else.


The text persuades, the *notes prove。

Offline

#2 2016-01-20 14:10:19

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

Re: rah_flat (template file extensions)

Can’t you associate filenames to modes in TextMate? That’s what I do in Panic Coda to associate .txp with the Textpattern Syntax Mode within.

For our Textpattern 4.7 core theme versions the filename is still up for debate. It would probably stay as .txp or just use .html. Since the template files are not Textile, I doubt that is right filename to use.

Offline

#3 2016-01-20 14:19:34

Destry
Moderator
From: Haut-Rhin
Registered: 2004-08-04
Posts: 4,021
Website

Re: rah_flat (template file extensions)

philwareham wrote #297506:

Can’t you associate filenames to modes in TextMate?

If I can, I’m not sure how. I can assign an unknown type to .textile, which will effect any other unknown type too, but I don’t see anywhere to make a special association from .txp alone. But I could be missing it.


The text persuades, the *notes prove。

Offline

#4 2016-01-20 17:08:24

Destry
Moderator
From: Haut-Rhin
Registered: 2004-08-04
Posts: 4,021
Website

Re: rah_flat (template file extensions)

philwareham wrote #297506:

Can’t you associate filenames to modes in TextMate?

Just figured that out now. They call it “grammars” in TM. Ha! Thanks for the tip.


The text persuades, the *notes prove。

Offline

#5 2016-01-21 00:15:45

mrdale
Moderator
From: Walla Walla
Registered: 2004-11-19
Posts: 2,201
Website

Re: rah_flat (template file extensions)

tip: sublime text works awesomely with textpattern rah_flat projects. It’ll let you have a window with a collection of files that you can save as a workspace, and you can even set up .txp as an .html equivalent which allows automatic closing of textpattern tags.

Love me some sublime text.

Offline

#6 2016-01-22 21:58:42

mrdale
Moderator
From: Walla Walla
Registered: 2004-11-19
Posts: 2,201
Website

Re: rah_flat (template file extensions)

I use a lot of forms… which can get confusing at times.

I realized the other day that if rah_flat were to look recursively under the forms directory and not just one level deep we would have a killer organizational tool.

Everything would be WAY, WAY easier to find.

Unfortunately Jukka is MIA, and it exceeds my skillset to do so. Anyone else wanna try?

-D

Offline

#7 2016-01-23 14:11:08

jakob
Moderator
From: Germany
Registered: 2005-01-20
Posts: 3,162
Website

Re: rah_flat (template file extensions)

mrdale wrote #297541:

I use a lot of forms… which can get confusing at times.

I realized the other day that if rah_flat were to look recursively under the forms directory and not just one level deep we would have a killer organizational tool.

Can you give an example of how you would organise things, or how the resulting forms should be named based on the folders? I generally try and use prefixes to make forms more findable.

Was just wondering if you could achieve this another way, i.e. work in parallel folder on templates and have a watch script create the templates in the naming scheme you want for rah_flat. Ideas here and here.


TXP Builders – finely-crafted code, design and txp

Offline

#8 2016-01-23 18:51:43

mrdale
Moderator
From: Walla Walla
Registered: 2004-11-19
Posts: 2,201
Website

Re: rah_flat (template file extensions)

Maybe you have…

  • 6 forms that deal with user profile management
  • 4 forms that deal with image galleries
  • 3 Page structure forms

I’d like to be able to simply have the following directories under “forms”

  • forms
    • user
      • user_login
      • user_password_reset
      • etc…
    • galleries
      • hero_large
      • hero_small
      • etc…
    • page
      • page_header
      • page_footer
      • etc…

Simply making rah_flat to look at the contents of subdirectories as well would be an elegant way to arrive at simple but effective organization… I can’t imagine it would be a difficult mod to rah_flat.

For extra points you could have it create custom form types

Offline

#9 2016-01-24 16:58:44

sacripant
Plugin Author
From: Rhône — France
Registered: 2008-06-01
Posts: 471
Website

Re: rah_flat (template file extensions)

mrdale wrote #297541:

I realized the other day that if rah_flat were to look recursively under the forms directory and not just one level deep we would have a killer organizational tool.

+1000, I had exactly the same request months ago

and Yes, with grunt you can organize files into subfolders and copy to another folder at the same level. but it’s turning a routine with a watcher and systematically copy all template files from one folder to another for every small change on a file. Briefly, the simplest would still be an update of the plugin… But this plugin is orphan.

I hope that core solution with the new core template system (4.7… 4.8 ?) will allow a free organization of template files in subfolders.

Offline

#10 2016-01-24 17:09:09

Destry
Moderator
From: Haut-Rhin
Registered: 2004-08-04
Posts: 4,021
Website

Re: rah_flat (template file extensions)

sacripant wrote #297560:

I hope that core solution with the new core template system (4.7… 4.8 ?) will allow a free organization of template files in subfolders.

I think that’s where the solution really needs developed, for example. First to provide custom labeling and organization in the Forms panel itself, and then for a plugin (rah_flat or any similar one that comes along) to mimic that structure in a flat-file tree as sub-folders. Likewise, to be able to edit the flat tree structure, and have Txp “suck up” that structure change in the Forms panel via the plugin, but that might be asking too much.


The text persuades, the *notes prove。

Offline

Board footer

Powered by FluxBB