Announcement

Collapse
No announcement yet.

How to put Article creator profile field in Article Page

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • [CMS] How to put Article creator profile field in Article Page

    Hello at all. Sorry for my bad english!!


    I want to get from db one userfield of article creator, and put them into the end of article in CMS.


    I have try to put this code in vbcms_content_article_page :
    PHP Code:
    <vb:if condition="$post['fieldx']"><dt>Descrizione</dt> <dd>{vb:raw post.fieldx}</dd></vb:if> 
    but i received a bad request from server.


    I think missing some variable in the content.php file...


    Can anyone help me please?


    Thank's, Thomas.

  • #2
    Variables are not global. The $post array is available in posts (like this one). It is not available in articles.

    To add that variable, you would need custom code because it is not exposed to the template.
    Translations provided by Google.

    Wayne Luke
    The Rabid Badger - a vBulletin Cloud demonstration site.
    vBulletin 5 API - Full / Mobile
    Vote for your favorite feature requests and the bugs you want to see fixed.

    Comment


    • #3
      Originally posted by Wayne Luke
      To add that variable, you would need custom code because it is not exposed to the template.
      There's any way to expose the code, or part of it, to get this function?

      Comment


      • #4
        Originally posted by killer_t View Post
        There's any way to expose the code, or part of it, to get this function?
        You would need to write custom PHP code to retrieve the values from the database and register it as variables to use in a template.
        Translations provided by Google.

        Wayne Luke
        The Rabid Badger - a vBulletin Cloud demonstration site.
        vBulletin 5 API - Full / Mobile
        Vote for your favorite feature requests and the bugs you want to see fixed.

        Comment


        • #5
          Thank's Luke, i know that method, but then I am obliged to write that code on the database.
          I want to require the user to enter that information...

          Comment

          widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
          Working...
          X