Template Editor

blindmime
@blindmime
12 years ago
775 posts
The template editor is not exactly conducive to editing a template. Code often extends outside the right margin making it necessary to scroll left/right. Long templates have a left/right scrollbar that is only visible when you scroll all the way to the bottom of the template (making it difficult when what you want to scroll over to access is at the top of the template).

I've taken to copying templates to a text editor, making changes, then copying back in.

Is there a better way?
updated by @blindmime: 12/08/13 12:56:24AM
paul
@paul
12 years ago
4,335 posts
Yeah, the template editor, as it stands, is only really meant for quick fixes and 'try outs'.
If you are doing any serious template development, I'd recommend a 'proper' environment, such as phpStorm.
hth
Pa


--
Paul Asher - JR Developer and System Import Specialist
michael
@michael
12 years ago
7,819 posts
second what paul said.

If your changing templates, what your doing is over-riding a module template and storing that info in the database.

If your comfortable with a development environment, you can do the same thing with files by over-riding the template at the skin level.

to override:
/modules/jrAudio/item_details.tpl

copy it to:
/skins/xxYourSkin/jrAudio_item_detail.tpl

and edit it there. much easier to compare files than database stored info if you want to merge any changes.
blindmime
@blindmime
12 years ago
775 posts
I never used the control panel template editor in jr4. Brian recommended using it in jr5, but I'd rather forgo it if possible. Basically, I come from doing all my jr4 editing in a basic text editor.

How do you handle images, css, etc.? I guess jr5 combines them all -- if you change css outside of the jr5 control panel do you need to do something beyond just updating the file?

Do you still need to work with the check box system in the control panel when you change a file?

What about the marketplace system? What happens when you update a module through the marketplace if you have your templates stored in your skin directory?

There are probably other possible issues I'm not considering.
michael
@michael
12 years ago
7,819 posts
Fair questions, but I think if you just give it a go one time, the answers to most of those questions will fall into place.

* the images are done via a function, that function allows the admin to override the image from the admin panel.
* css set in the skin's CSS file can be used to over-ride any module css
* after making changes, running the integrity check and clearing the caches is the first steps if the changes dont show up.
* dont need to check any boxes, the over-ride works automatically.
* templates over-ridden via the skins will work the same as templates over-ridden via the template editor in the case of an update via the marketplace. (that is they will still over-ride the template and if the template has changed, the new template will need to be changed.)
brian
@brian
12 years ago
10,149 posts
Make sure and check out my response on your other thread about the templates and updating:

http://test.jamroom.net/the-jamroom-network/forum/using-jamroom/1148/marketplace-update#r1190

Thanks!


--
Brian Johnson
Founder and Lead Developer - Jamroom
https://www.jamroom.net

Tags