Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1

TOPIC:

ALIAS - More than one field 28 Sep 2012 11:33 #4129

  • BTB300
  • BTB300's Avatar Topic Author
  • Offline
  • Moderator
  • Moderator
  • Posts: 415
  • Thank you received: 132
Just Another Thought
An extension to the alias field could be to allow more than one field value

I am thinking along the lines of the ability to do this that is already available in the core...
<%user_first%> <%user_last%> (<%user_email%>) => john doe (This email address is being protected from spambots. You need JavaScript enabled to view it.)

For example an address book when two fields are used for the persons name [name] and [surname] the alias would then become john-doe

- you could then drag the two fields to the alias the alias would obviously become the persons full name

- if you wanted more fields you would pass the first alias to a second alias

- or even better allow more than one field to be dragged to the alias field and the order in which they are displayed is how they will be joined

A Further Addition - Create String function

the same as the alias field but allows you to combine fields to create a string of text an space character inserted between fields
- this would be useful when communicating specific information (message) to a user

[Your registration will expire on] [expire_date] [ after this date your access will be limited will not be able to access the] [members_area_name] [after this date]

Once again Just a thought

Please Log in or Create an account to join the conversation.

Last edit: by BTB300.

Re: ALIAS - More than one field 15 Nov 2012 23:54 #5402

  • JoomGuy
  • JoomGuy's Avatar
  • Offline
  • Moderator
  • Moderator
  • Joomla Enthusiast, Lover of Cooking
  • Posts: 1115
  • Thank you received: 195
Great idea - this would be super useful to those less comfortable with SQL!

For those of you who are comfortable with it, it could be achieved manually by using MySQL's concatenate:
CONCAT('a.field1', ' ', 'a.field2') as your_alias
in any of your model's queries.

Best wishes,

Gez
Need help with your Cook/Joomla Project? . PM me to find out what I can help with. NO time wasters please!!!

Please Log in or Create an account to join the conversation.

Last edit: by JoomGuy.
  • Page:
  • 1
Time to create page: 0.051 seconds
Great UX great performance and definitely a time saver. It only took me 10 minutes of playing around before purchasing a subscription and right now I just want to throw more money at you! I just started a new project and after just 4h I can already tell it probably saved me several days of work. I'm building a wholesale ordering system with sales rep management. I have not looked at the code yet but so far: impressive.
flip (Forum)

Get Started