Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Template Naming Convention
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  14 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Nick Savov  
View profile  
 More options Jul 21 2012, 9:20 am
From: Nick Savov <n...@iowawebcompany.com>
Date: Sat, 21 Jul 2012 06:20:18 -0700 (PDT)
Local: Sat, Jul 21 2012 9:20 am
Subject: Template Naming Convention

Hi everyone,

Right now, as far as I'm aware, there is not a Template Naming Convention
that is reflected and honored by the code.  This results in peculiar bugs
popping up because different functions expect different things and validate
differently.  For example:
http://joomlacode.org/gf/project/joomla/tracker/?action=TrackerItemEd...

http://joomlacode.org/gf/project/joomla/tracker/?action=TrackerItemEd...

Template Developers also have different expectations and that's why many
include spaces within their templateDetails.xml name tag.

In order to properly fix those bugs and prevent such bugs from occurring in
the future, a proper naming convention needs to be decided.

I would like to see template developers having an opportunity to name the
template whatever they'd like (with or without spaces, with or without
uppercases, and with or without special characters), so that it actually
reads
like a name in the backend and not as though a computer generated it.

I would like to them to be able to use a language key for the name, so that
it
can be easily translated into other languages.

With that being said, can we make a new tag called
<displayName></displayName> that will contain the language key and
be used for the backend name?

The folder name convention could then be all lowercase without spaces or
special characters, and the xml name tag would match it, while the xml
displayName tag could be whatever the developer wanted.

Your thoughts?

Kind regards,
Nick


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Matt Thomas  
View profile  
 More options Jul 21 2012, 8:58 pm
From: Matt Thomas <m...@betweenbrain.com>
Date: Sat, 21 Jul 2012 20:58:04 -0400
Local: Sat, Jul 21 2012 8:58 pm
Subject: Re: [jcms] Template Naming Convention

Hi Nick,

I agree about improving the way the templateDetails.xml <name> field is
handled. In 1.5, we could use "Test Template" in templateDetails.xml, and
the template name would be displayed as "Test Template" in the template
manager, but it would be converted to lower case and the space parsed (I
don't recall if it was changed to a dash or simple removed) for the name of
the directory created for the template.

I'd personally like to see the name field run through the same logic as the
article title field is when creating the alias as the alias that is created
is a valid system path, which is a major implication of the template name.

As template styles can be named whatever you want, and since the name
of template itself represents the directory of the template, I'd be opposed
to introducing the <displayName> field and allowing language keys. I think
this would likely cause quit a bit of confusion as the name of the
template should really match the directory. I'd personally rather see how
the <name> field is handled to resolve the issue rather than introducing
another field in templateDetails.xml.

Thanks for bringing this up!

Best,

Matt

Sent from my phone that uses an open source operating system.
On Jul 21, 2012 9:20 AM, "Nick Savov" <n...@iowawebcompany.com> wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Chad Windnagle  
View profile  
 More options Jul 22 2012, 12:08 pm
From: Chad Windnagle <c...@s-go.net>
Date: Sun, 22 Jul 2012 12:08:42 -0400
Local: Sun, Jul 22 2012 12:08 pm
Subject: Re: [jcms] Template Naming Convention

I wonder I'd we ahold take some cues from how we do thing in other areas
and instead use a XML parameter named <alias>.

--

Pay Your s-go Services Invoices - Click
Here!<http://www.s-go.net/Pay-for-Services/form.html>

------------------------------
[image: Small Logo] <http://www.s-go.net/>
*Chad Windnagle*
s-go Consulting
*607-330-2574 x103
607-229-6260 (Cell)
Website Design - SEO - Video <http://www.s-go.net/>*
Follow Me: [image: Facebook] <http://www.facebook.com/sgoconsulting> [image:
LinkedIn] <http://www.linkedin.com/in/drmmr763> [image:
Twitter]<http://www.twitter.com/drmmr763>
Fight SOPA <https://www.google.com/landing/takeaction/>


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Matt Thomas  
View profile  
 More options Jul 22 2012, 1:41 pm
From: Matt Thomas <m...@betweenbrain.com>
Date: Sun, 22 Jul 2012 13:41:50 -0400
Local: Sun, Jul 22 2012 1:41 pm
Subject: Re: [jcms] Template Naming Convention

Chad,

How would you use this field? Would it introduce the possibility of naming
the template, not style, something other than the template's directory name?

Best,

Matt

Sent from my phone that uses an open source operating system.
On Jul 22, 2012 12:08 PM, "Chad Windnagle" <c...@s-go.net> wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Chad Windnagle  
View profile  
 More options Jul 22 2012, 10:35 pm
From: Chad Windnagle <drmmr...@gmail.com>
Date: Sun, 22 Jul 2012 22:35:07 -0400
Local: Sun, Jul 22 2012 10:35 pm
Subject: Re: [jcms] Template Naming Convention

Hi Matt:

I was thinking along the same lines of how we handle content as an example.
This should definitely be a relationship to the template directory.

For instance:

<name>My Great Template</name>
<alias>my_great_template</alias>

There is a bit of a complication with using languages strings for the alias
if it is also the directory name. I don't think it would be a good idea to
introduce translations of the directory name. For the template name,
though, it wouldn't be a problem as long as the <name> param isn't attached
to the directory.

Are styles handled in the XML right now at all? I'm not sure they are (I've
not seen it, so if you know of an example I'd like to take a peak).

-Chad

Regards,
Chad Windnagle
Fight SOPA <https://www.google.com/landing/takeaction/>


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Matt Thomas  
View profile  
 More options Jul 23 2012, 5:52 am
From: Matt Thomas <m...@betweenbrain.com>
Date: Mon, 23 Jul 2012 05:52:27 -0400
Local: Mon, Jul 23 2012 5:52 am
Subject: Re: [jcms] Template Naming Convention

Hi Chad,

I assume that you would use <alias> as the name of the template directory
and <name> as the name displayed in the the template manager? If so, and
with wanting to maintain a relationship to the template directory, why not
just run <name> through JApplication::stringURLSafe (
http://docs.joomla.org/JApplication::stringURLSafe/1.6) for the directory
name when installing and call it a day?

For example, a templates using <name>My Template's Super Cool Name!</name>
would be installed at /templates/my-template-s-super-cool-name Would that
make sense and satisfy your goal?

From what I understand, template styles exist only in the database as they
are essentially a different set of saved parameters.

Best,

Matt Thomas
Founder betweenbrain <http://betweenbrain.com/>™
Lead Developer Construct Template Development
Framework<http://construct-framework.com/>
Phone: 203.632.9322
Twitter: @betweenbrain
Github: https://github.com/betweenbrain


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Rouven Weßling  
View profile  
 More options Jul 23 2012, 10:29 am
From: Rouven Weßling <m...@rouvenwessling.de>
Date: Mon, 23 Jul 2012 16:29:55 +0200
Local: Mon, Jul 23 2012 10:29 am
Subject: Re: [jcms] Template Naming Convention

Why can't this be done the same way as with other extensions? (Which involves using language files for the display name)

Rouven

On 23.07.2012, at 04:35, Chad Windnagle wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Matt Thomas  
View profile  
 More options Jul 23 2012, 10:59 am
From: Matt Thomas <m...@betweenbrain.com>
Date: Mon, 23 Jul 2012 10:59:06 -0400
Local: Mon, Jul 23 2012 10:59 am
Subject: Re: [jcms] Template Naming Convention

When you put it that way, being consistent with the behavior of the other
types of extensions would be a good thing. How would you determine the name
of the directory when using a language file?

Best,

Matt Thomas
Founder betweenbrain <http://betweenbrain.com/>™
Lead Developer Construct Template Development
Framework<http://construct-framework.com/>
Phone: 203.632.9322
Twitter: @betweenbrain
Github: https://github.com/betweenbrain

On Mon, Jul 23, 2012 at 10:29 AM, Rouven Weßling <m...@rouvenwessling.de>wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Rouven Weßling  
View profile  
 More options Jul 23 2012, 11:02 am
From: Rouven Weßling <m...@rouvenwessling.de>
Date: Mon, 23 Jul 2012 17:02:29 +0200
Local: Mon, Jul 23 2012 11:02 am
Subject: Re: [jcms] Template Naming Convention

You rely on the extension developer not giving you a nonsense name ;)

Rouven

On 23.07.2012, at 16:59, Matt Thomas wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Matt Thomas  
View profile  
 More options Jul 23 2012, 11:04 am
From: Matt Thomas <m...@betweenbrain.com>
Date: Mon, 23 Jul 2012 11:04:42 -0400
Local: Mon, Jul 23 2012 11:04 am
Subject: Re: [jcms] Template Naming Convention

LOL!

Would it be based on the name in the language file? Basically, like we've
discussed and convert that to an URL safe string?

Best,

Matt Thomas
Founder betweenbrain <http://betweenbrain.com/>™
Lead Developer Construct Template Development
Framework<http://construct-framework.com/>
Phone: 203.632.9322
Twitter: @betweenbrain
Github: https://github.com/betweenbrain

On Mon, Jul 23, 2012 at 11:02 AM, Rouven Weßling <m...@rouvenwessling.de>wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Rouven Weßling  
View profile  
 More options Jul 23 2012, 11:07 am
From: Rouven Weßling <m...@rouvenwessling.de>
Date: Mon, 23 Jul 2012 17:07:34 +0200
Local: Mon, Jul 23 2012 11:07 am
Subject: Re: [jcms] Template Naming Convention

I'm not sure what you saying. For all other extensions we have naming conventions:

plg_system_sef
mod_languages
com_content

In the case of modules that actually matches the folder name. We than use that name as the key for the translation to show a user friendly name.

Rouven

On 23.07.2012, at 17:04, Matt Thomas wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Matt Thomas  
View profile  
 More options Jul 23 2012, 11:19 am
From: Matt Thomas <m...@betweenbrain.com>
Date: Mon, 23 Jul 2012 11:19:49 -0400
Local: Mon, Jul 23 2012 11:19 am
Subject: Re: [jcms] Template Naming Convention

I guess that's always been an issue as templates seemed to have always been
handled differently.

As of right now, a template's directory can be whatever the developer
decides (i.e. my-template-s-super-cool-name) and we don't prefix those
directories with the extension type, which I don't think we'd need as
they'd always be in the template's directory.

So, if my language string named the template "My Template's Super Cool
Name!" would that be converted to "my-template-s-super-cool-name" when
creating the directory, or would the developer need to declare that
elsewhere?

Hope that makes sense.

Best,

Matt Thomas
Founder betweenbrain <http://betweenbrain.com/>™
Lead Developer Construct Template Development
Framework<http://construct-framework.com/>
Phone: 203.632.9322
Twitter: @betweenbrain
Github: https://github.com/betweenbrain

On Mon, Jul 23, 2012 at 11:07 AM, Rouven Weßling <m...@rouvenwessling.de>wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Chad Windnagle  
View profile  
 More options Jul 23 2012, 10:59 am
From: Chad Windnagle <drmmr...@gmail.com>
Date: Mon, 23 Jul 2012 10:59:35 -0400
Local: Mon, Jul 23 2012 10:59 am
Subject: Re: [jcms] Template Naming Convention

> I assume that you would use <alias> as the name of the template directory
> and <name> as the name displayed in the the template manager? If so, and
> with wanting to maintain a relationship to the template directory, why not
> just run <name> through JApplication::stringURLSafe (
> http://docs.joomla.org/JApplication::stringURLSafe/1.6) for the directory
> name when installing and call it a day?
> For example, a templates using <name>My Template's Super Cool Name!</name>
> would be installed at /templates/my-template-s-super-cool-name Would that
> make sense and satisfy your goal?

Would this accomplish having translated template names? I was thinking
along the lines of what Nick mentioned to have translations for the
template name (not the directory name).

If we only had the <name> param to work with, it would need to be able to
fit three needs:

1) template name (in template manager)
2) template name translated (in template manager)
3) template directory, cannot be translated (we don't want to reference a
different directory just because its a different language)

Something we would have to overcome is knowing when to use stringURLSafe to
generate the directory from the <name> field, but what happens when the
default language is switched...especially if we are using language strings
for the <name> parameter.

Since the language file needs to be able to have different translations for
the string for the template manager, using stringURLSafe on the same
language constant would result in a different directory name, right?

Regards,
Chad Windnagle
Fight SOPA <https://www.google.com/landing/takeaction/>

On Mon, Jul 23, 2012 at 10:29 AM, Rouven Weßling <m...@rouvenwessling.de>wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Sam Moffatt  
View profile  
 More options Jul 23 2012, 12:08 pm
From: Sam Moffatt <pasa...@gmail.com>
Date: Mon, 23 Jul 2012 09:08:22 -0700
Local: Mon, Jul 23 2012 12:08 pm
Subject: Re: [jcms] Template Naming Convention
It should be underscores and I'm not sure if that is still relevant.
Just glancing through the template installer code we have this:
https://github.com/joomla/joomla-platform/blob/master/libraries/jooml...

So name is a CMD filtered string of the name value in the template and
then the element is the spaces replaced with underscore version of
that. However the CMD filter has already stripped any spaces IIRC:
https://github.com/joomla/joomla-platform/blob/master/libraries/jooml...

Which means I'm not sure what the str_replace line is doing there but
I can't imagine it to be particularly effective.

What Rouven is suggesting is that you call it
tpl_my_templates_super_cool_name and Joomla will put it in a folder
with the same name and then you can write language strings using that
like TPL_MY_TEMPLATES_SUPER_COOL_NAME="My Template's Super Cool
Name!". I believe that the name is already translated in the UI in
many places. If there is somewhere it isn't translated then we'd need
to update that code however I believe that JM was rather thorough.

Cheers,

Sam Moffatt
http://pasamio.id.au


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »