The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Syntax question for the skin

Discussion in 'User Experience' started by kadinlar, Sep 23, 2016.

  1. kadinlar

    kadinlar Registered

    Joined:
    Sep 23, 2016
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    istanbul
    cPanel Access Level:
    Website Owner
    I'm trying to use an include which will bring up a file which has the account owner as part of the file name. ie - if the account is owned by root, then it would bring up /tables/root-support.html If it were owned by joe, then it would grab /tables/joe-support.html

    I did something similar to give resellers their own logo based on the owner variable, and that has worked fine. Now I want to add a custom table for support links... online payments, support center, account upgrades, etc -- all things which the reseller would generally have on his own website, but which would ideally be linked from in CPanel as well.

    So I tried this... (replace hard brackets [ and ] with appropriate & and & of course)

    [cpanel include=&tables/[cpanel print=&$CPDATA{'OWNER'}&]-support.html&]

    It fails because it sees the second set of quotes and closes the include, and then displays something like &root-support.html& as text on the screen. I assume it wasn't happy with a cpanel link being embedded in another one. So I also tried several variations of this...
    [cpanel include=&tables/$CPDATA{'OWNER'}-support.html&]

    Also no luck.

    FWIW, if anyone is curious about my syntax for the logo display, the above should be a good hint... but here's what I used:
    [img src=&[cpanel printvar=&dprefix&][cpanel print=&$CPDATA{'OWNER'}&]-cp.gif&]

    Any help would be appreciated!
     
  2. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,854
    Likes Received:
    675
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    Hello,

    We might be able to offer an alternative solution. Could you provide us with some more information on the specific steps you have taken thus far, and perhaps a screenshot showing an example of what you are attempting to configure? This will allow us to follow the same steps when attempting to reproduce the issue. Ensure to use CODE tags when necessary.

    Thanks!
     
  3. cPanelAdamF

    cPanelAdamF cPanel Product Owner
    Staff Member

    Joined:
    Mar 21, 2013
    Messages:
    174
    Likes Received:
    11
    Trophy Points:
    18
    Location:
    Houston TX
    cPanel Access Level:
    DataCenter Provider
    Twitter:
    As an alternative to using an OWNER variable to decide which logos should be shown to an end user, we do support the customization of logos in Paper Lantern. Branding - Documentation - cPanel Documentation is worth a read for how to do that natively.
     
Loading...

Share This Page