Customer Portal

Get Involved. Join the Conversation.

Topic

    Sergio Andres Barreto Valderrama
    How to add a text in customer portal in a of Navigation Tab...Answered
    Topic posted June 4, 2019 by Sergio Andres Barreto ValderramaBronze Medal: 1,250+ Points 
    76 Views, 18 Comments
    Title:
    How to add a text in customer portal in a of Navigation Tab ?
    Summary:
    Add text in customer portal
    Content:

    How can I change the text found at the end of the "contact us" page for new text?

    I attach the image.


    I appreciate any help!

    Version:
    19A
    Image:

    Best Comment

    Sebastiaan Draaisma

    Well done! I assume you created CUSTOM_MSG_FOR_CONTACT_US (underscore between the words contact & us)
    Use the following code in your ask.php

    <span>#rn:msg:CUSTOM_MSG_FOR_CONTACT_US#</span>

    You can place this anywhere you want. You could open your customer portal custhelp.com/app/ask and use the browser console (right click in your browser and choose Inspect element) to see on which line you want to add your code (for example above the submit button).

    Save the change & deploy your page through stage and promote

    Comment

     

    • Shiloh Madsen

      The default contact us page does not contain a text block like the one you reference,but at the bottom, you've also highlighted an error in a widget. It looks like it is telling you that it cant find the attribute on the incident table that you are referencing. Perhaps this attribute is not exposed to customer portal? For the text above, it seems to be some sort of privacy statement, if you could paste the code from ask.php I could likely tell you where its being generated, but my guess would be its a message base somewhere. 

    • Shiloh Madsen

      So as I mentioned above, You've circled two seperate elements, but it looks like the name filled in there is either coming from the name filled into your custom field settings (Admin->Database->Custom Fields) or being set at an attribute override level on the view of ask.php itself. The block of text seems to long for either though, so I am assuming that if you look at the code for ask.php itself you'll see an input tag, something else,and then another input tag. If so, the something else is whats generating that text blob. 

    • Sebastiaan Draaisma

      To access the ask.php you need a Webdav connection (I use cyberduck) but you are free to use another program. Your profile needs the right permissions and you may also need to enable MOD_CP_ENABLED in your configuration settings.

      Once you have your profile enabled with the right permissions you should create a custom message base entry which acts as a variable. This way you can easy change the content without the need to stage & promote changes.

      If you are new to this you may want to read the following articles

      Once connected, the location of the ask.php is:

      https://YOURSITE.custhelp.com/dav/cp/customer/development/views/pages/ask.php
      (replace YOURSITE with the name of your site)

      • Sergio Andres Barreto Valderrama

        Hello,

        I have validated the profiles, and enabled the configuration values:

        MOD_CP_ENABLED
        MOD_CP_DEVELOPMENT_ENABLED

        And I have managed to get a WebDav connection with Cyberduck. Now how can I modify the text found at the end of the contact page?

         

        I thanks you!

    • Sebastiaan Draaisma
      1. Navigate to the ask.php and open the page in the editor.
      2. Insert the custom message base entry (HTML type) where you want the text to apear:
        <span>#rn:msg:CUSTOM_MSG_ABC#</span>
      3. Save the ask.php file
      4. Stage the php file
      5. Test your stage environment
      6. Promote the php file
      7. Test your production environment
      8. Modify the custom message base entry when you need to make changes to your text
    • Sebastiaan Draaisma

      Ah, sorry. No you have to navigate to the ask.php through webdav.

      https://YOURSITE.custhelp.com/dav/cp/customer/development/views/pages/ask.php

       

    • Sebastiaan Draaisma

      Do yourself a favor and use a better editor, this will make things so much easier for you. Notepad is not the way to go laugh

      My advice is to use one of the following:

      • Notepad++
      • Brackets
      • Visual Studio Code

      All of them are free.
      That said....

      If you want to do a good job, you do not want to write the text inside your ask.php The reson for this is that you would need webdav again to make changes to your text and then need to deploy your page which is a waste of time. If you want to do it good, you create a custom message base entry (a varialble) that will hold your text. The variable (custom message base entry) has to be placed on your ask.php and you can place it anywhere you want to have the text apearing. This way, if you need to change your text you simply open the message base entry in the agent desktop, make the change, hit the save button and your'e done.

    • Sebastiaan Draaisma

      So, create a custom message base entry (html type) and write your text there.

       

    • Sebastiaan Draaisma

      Well done! I assume you created CUSTOM_MSG_FOR_CONTACT_US (underscore between the words contact & us)
      Use the following code in your ask.php

      <span>#rn:msg:CUSTOM_MSG_FOR_CONTACT_US#</span>

      You can place this anywhere you want. You could open your customer portal custhelp.com/app/ask and use the browser console (right click in your browser and choose Inspect element) to see on which line you want to add your code (for example above the submit button).

      Save the change & deploy your page through stage and promote

    • Sebastiaan Draaisma

      Excellent! Now you know how to do it for the next time.
      Only thing left is to mark this topic as solved laugh

      • Sergio Andres Barreto Valderrama

        I have one last question, when the client selects a category type, how can I show him a warning message?

        • Sebastiaan Draaisma

          This can be done with javascript where you control the visibility of a div (toggle div visibility) and place the message base entry in this div. This way the message visibility will be controlled through the div visibility which in turn is controlled by a javascript based on the selection.