Welcome, Guest
Username: Password: Remember me

TOPIC: [FAQ] Default Aliases in 2.7

[FAQ] Default Aliases in 2.7 19 May 2015 12:17 #13100

  • MorganL
  • MorganL's Avatar
  • Offline
  • Platinum Member
  • Posts: 438
  • Thank you received: 53
  • Karma: 15
I have taken the auto name generation for views for granted for so long now.. so now the auto generate function has gone, I am at a loss.

I am assuming the STAR we can click on a layout denotes the DEFAULT layout.

Do I need to call this view default or will that happen automatically so I should just name it whatever I like as it will be overruled?
Morgan Leecy MCSE

Novell / Linux
PHP. MYSQL, Apache, node.js
Coldfusion, JQuery, HTML5
Joomla
The administrator has disabled public write access.

[FAQ] Default Aliases in 2.7 19 May 2015 12:28 #13102

  • admin
  • admin's Avatar
  • Offline
  • Administrator
  • Chef
  • Posts: 3711
  • Thank you received: 987
  • Karma: 140
Ok this is tricky, but yes I have changed the behaviors in the builder. Don't worry, it is working the same. Simply you do not see anymore 'default' written in the builder.

Because when you change a default layout to another, then the builder must re-invent the auto-name for the layout wich has lost its previous default.
It is not always done correctly when you have few layouts. If one has already a auto-name, it would take 'view1' or 'view2'... Well I don't like it.

So now, just give a different alias for every layout, and the one wich is set as 'default' with the star. Will be renamed at the generation as default.php
I could improve and tell the user it in the builder with a stroke line over the alias. I was thinking doing this for ergonomy.

Has it been a problem for you ?
Coding is now a piece of cake
The administrator has disabled public write access.

[FAQ] Default Aliases in 2.7 19 May 2015 12:29 #13103

  • admin
  • admin's Avatar
  • Offline
  • Administrator
  • Chef
  • Posts: 3711
  • Thank you received: 987
  • Karma: 140
And still you can give 'default' alias for the layout, but then if you set another as default, Maybe you can have a bug, true.

I must check better that point.
Ouch...
Coding is now a piece of cake
The administrator has disabled public write access.
The following user(s) said Thank You: MorganL

[FAQ] Default Aliases in 2.7 19 May 2015 12:55 #13106

  • MorganL
  • MorganL's Avatar
  • Offline
  • Platinum Member
  • Posts: 438
  • Thank you received: 53
  • Karma: 15
that is EXACTLY what I was doing naming stuff default but not doing the star, or putting the star in the wrong view, and whereas it didn't error, I was not seeing all my views as menu items

I am currently going through my project (which is not a bad thing) and giving them all proper aliases and setting the DEFAULT STAR.

Easy to work out, the system is sound, I would actually just outlaw the string DEFAULT as a manual entry?. To be fair, I never had any issues with the auto alias function in the layouts of the old builder, the only auto function that was frustrating was when creating fields in tables with numbers in them, but it was something I alwasy knew how to work with and was not ever an issue

Just as an aside, the builder is working beautifully today and the only albatross is that silly joomla user select box error that I cant shake and hopefully you have now fixed!
Morgan Leecy MCSE

Novell / Linux
PHP. MYSQL, Apache, node.js
Coldfusion, JQuery, HTML5
Joomla
The administrator has disabled public write access.

[FAQ] Default Aliases in 2.7 19 May 2015 13:13 #13109

  • admin
  • admin's Avatar
  • Offline
  • Administrator
  • Chef
  • Posts: 3711
  • Thank you received: 987
  • Karma: 140
About the defaults, I chosen this way because I think Joomla is doing wrong with these defaults stuffs.

In future, Cook will build for others frameworks, and the default view should be configured in the component config such as F0F does. You can then have a fallback page that is not named 'default'.

From you perspective, I can look like beeing in rebellion, (such as Niko), but I can only accept the standards that make sense.
I've seen Joomla changing its standards many times, and I had to follow as well, sometimes for a non-sense.

By the way, For Joomla purists I would say : "just call all your layouts 'default' in the builder, and then you will be happy to have default layouts even for item views" But when you have many tabs opened in your IDE which all are named default.php, good luck to find your way and not make mistake.

Another idea would be to call all files the same name to don't make any naming mistake... lol it is an absolute non sense.
Coding is now a piece of cake
The administrator has disabled public write access.
The following user(s) said Thank You: MorganL

[FAQ] Default Aliases in 2.7 19 May 2015 13:30 #13110

  • MorganL
  • MorganL's Avatar
  • Offline
  • Platinum Member
  • Posts: 438
  • Thank you received: 53
  • Karma: 15
So just to confirm, I don't NEED to make a view a default? That was all layouts will have the full alias name I select?

If there is not default though, how does an EDIT task know which item layout to use if no default is selected?

Also, how would the system know which collection layout to use if you just use

?option=com)mycomponent&view=myview

and there are multiple collections layouts for the myview table
Morgan Leecy MCSE

Novell / Linux
PHP. MYSQL, Apache, node.js
Coldfusion, JQuery, HTML5
Joomla
Last Edit: 19 May 2015 13:31 by MorganL. Reason: more info
The administrator has disabled public write access.

[FAQ] Default Aliases in 2.7 19 May 2015 13:40 #13112

  • admin
  • admin's Avatar
  • Offline
  • Administrator
  • Chef
  • Posts: 3711
  • Thank you received: 987
  • Karma: 140
First layout are used as fallback.

For a normal use of the component, you even do not need to set defaults. Just if you want to avoir confusion when you have more than one.
Coding is now a piece of cake
The administrator has disabled public write access.
Time to create page: 0.064 seconds

Get Started