98 Posts
Edwin
10 years ago
Topic
Hello all

I thought grabbing the value of the article "alias" field was as simple as for the other fields when using SD Field Concat. I can grab the values of any other field and concat it into another field. But why not this one? Unless I'm overlooking something very obvious. I use #art_alias# or just #alias# or $alias. I'm not sure how to reach Simon for support.

My setup is Joomla 3.1.6 and Seblod 3.1.5.

Thank you in advance
Get a VIP membership
175 Posts
webcastor
10 years ago
0
Level 1
Are you trying to concat it on display or during New/Edit?
I made a dumb question, and I know that now. I would say that it does not yet know the alias, unless it is specified. The documentation clearly states:

Getting The ID Of an Article
A lot of people make the mistake of using #art_id# to get the article ID of the current article. This is OKAY if the article is being EDITED, but if it is new then the value of #art_id# does not yet exist.This is why you also have the option of concatenating in the field list. This will get both an existing article ID as well as a new articles ID. If the article is new, the plugin queries your MySQL database to get the next auto increment value of the #__content table. Values are also stored in key value pairs inside the increments.ini file bundled with the plugin. This also acts as a cache on future article saves, so no database lookups are performed after the first save.


In my opinion, that might mean your concat would be generated ok, once in Edit mode.
98 Posts
Edwin
10 years ago
0
Level 1
Hello Webcastor and thank you for your reply.

I'm trying to get the article "alias" field. It does not grab it even on edition. I even created new fields and tried on existing articles, but it doesn't get the field at all. yet when I look at the alias field, there is a value there. I'm not so worried about getting it during creation. If I can get it during edition, then it will be ok. But it doesn't even do that.
175 Posts
webcastor
10 years ago
0
Level 1
In case you are using the default Article Alias field, you should use #art_alias#, similarly for all "derived" fields, you have to use the alias of the field. If you create another field, your field storage have to be defined as Standard|Article|alias.
The documentation mentions the @alias() variant, which you might use as @alias(art_id), provided art_id is present in the layout. That will, however, perform another query on articles, so it might take a little longer with increasing number of articles.
If it still does not show, even after using other variations, I think you better contact Simon.
98 Posts
Edwin
10 years ago
0
Level 1
Hi Webcastor

I've been using the old SD Field Concat methods and wasn't aware of the @ varient added. I changed from #art_alias# to @alias(art_id) and it worked! I'm not sure why #art_alias# didn't want to work. I'll have to read through documentation to get to grips with the new additions. But as you said, it could slow things done with an increase in articles. For now it's ok though.

Thank you very much. You were just great, as usual. I will mark this topic solved.
Get a VIP membership