Good day all,
Version 2.5.2 of plugin SD Field Concat (available from the SD Plugins store) has been released and introduces a new feature. Here is a description of the feature as talen from the plugin overview page:
Getting Any Column Value From #__content (++ V2.5.2)
This is a new feature introduced in Version 2.5.2 of the plugin. There is now a NEW field selector in the list of fields to concatenate, and it's syntax is as follows:
@colname(field_name)
Where 'colname' is the name of any column in the #__content table, and 'field_name' is the name of any field IN YOUR CONTENT TYPE FORM who's value you want to use as the ID for the id column of #__content.
For example, let's say you have (inside your form) a select dynamic field called 'my_articles' which lists articles form your content table using their ID for the value and their title as the select label. Doing this:
@alias(my_articles)
Is going to search the #__content table, find the row with the ID who's value matches the selected record in your select dynamic field, and return the 'alias' column of that row as the concatenation value.
Likewise, this:
@created(my_articles)
Will fetch the alias of that same record.
Now, what if you already KNOW the ID of the article you want to grab a certain column from in #__content and you don't want to just build a new field to grab the ID from? Simple, you have the choice of pushing the ID value straight into the brackets as follows:
@title(23)
This will fetch the title of the article who's ID is 23.
@catid(54)
Will fetch the catid column for the article with ID 54
What to expect in the future? Soon you will be able to get the value of ANY cck field from ANY article using the above method, and not just columns inside of #__content.
I must give credit to Viktor Iwan for having the balls to hack my plugin and add similar functionality for himself. Had he not raised the bar, this change would never have seen it into the plugin. THANK YOU Viktor.
Kind regards,
Simon