PDA

View Full Version : How to add usertitle to CMS


SilverBoy
09-04-2015, 11:56 AM
Hi

I want to add usertitle and User Biography to CMS article, I tried to add user.usertitle to the sql query which was in article.php file around line 170 and start with if (self::QUERY_BASIC == $required_query OR self::QUERY_CONTENT == $required_query)
{
$sql = "SELECT node.nodeid, node.showrating, node.setpublish, node.new,
directly after user.username, but I get unexpected error after that directly I don't know why !!?

So could you please help me in showing both usretirle and userbio in the articles?

Thanks in advance.

BirdOPrey5
09-06-2015, 09:10 AM
From what I can see it's only returning data from the node table, if the user table hasn't been joined in the query you can't pull data from the user table in the same query.

What is the full SQL query? You only posted a small part so i can't be sure.

SilverBoy
09-08-2015, 02:09 AM
Thank ypi Joe, I figured it out using the steps explained in How to add new field to the CMS article in article section.