Custom Content in Paper Lantern - Specific Pages Only

JamesOakley

Well-Known Member
Apr 15, 2011
83
2
58
cPanel Access Level
Root Administrator
I think this is a simple question. I don't know whether the answer is simple ;)

Two premises.

1. cPanel 11.46 makes it possible to insert custom content into the header and footer regions of Paper Lantern.
2. When this was announced (prior to the release of 11.46), we were told that page-specific headers and footers could be specified (as well as the global ones that are given in the current Paper Lantern documentation). They need to be named after the appkey for the page, and addon_domains was given as an example.

I can't get the second of those to work.

Do I conclude that: (i) these page-specific insertions of custom content are not mentioned in the official documentation, and therefore they were not actually implemented in 11.46 as planned, or (ii) they are implemented (just missing from the documentation) and I'm therefore doing something wrong.

If (i), is there a target release version for introducing this?
If (ii), is the blog post syntax the final version, or does the documentation need sharpening to help someone like me do this correctly?
 

cPanelAdamF

cPanel Product Owner
Staff member
Mar 21, 2013
296
135
168
Houston TX
cPanel Access Level
DataCenter Provider
Twitter
Let's check a couple of things first before we draw conclusions like those.

Could you verify the filename and location of the UI Includes you're expecting to see show up in your interface? For example, the full path should be either
Code:
/var/cpanel/customizations/includes/addon_domains_page_header.html.tt
for a global include or
Code:
/home/$reseller/var/cpanel/reseller/includes/addon_domains_page_header.html.tt
for an include that should only be applied to $reseller's users.

It may be helpful to make the content of these includes colorful so that it stands out against the interface while you're working on it. Here's how the example UI Includes look that our QA people came up with when testing this feature out:

Screen Shot 2014-12-03 at 9.14.00 AM.png

The next thing to verify would be the chain of account ownership. Right now, cPanel will always show the end-user the customizations (styles, brand, includes, etc) that their account owner specifies. This can trip you up when you log in to cpanel as a reseller and expect to see your own customizations. We had to make a hard design decision with this one and we're not against changing the implementation in the future if it causes un-due confusion.

So the thing to verify with this concern is that the account you're logging into cpanel with is indeed owned by either itself or by the correct reseller.

Let me know the answers to those questions so that we can figure out why you're seeing the misbehavior. After we get you straightened out, I'll queue up additional work on the areas of the documentation so that other users can avoid the same conundrum.
 

JamesOakley

Well-Known Member
Apr 15, 2011
83
2
58
cPanel Access Level
Root Administrator
Thanks Adam

I wrote a great long reply to you, splitting your post into multiple parts to answer each question.

Then I spotted what had happened, so I don't need my long reply.

http://blog.cpanel.net/customizing-paper-lantern/ said:
To target footers on the pages inside Addon Domains only, create an addon_domains_footer.html.tt file
Compare to

For example, the full path should be either /var/cpanel/customizations/includes/addon_domains_page_header.html.tt for a global include
Sure enough, with "page_" in the filename, it works.

So the documentation work needed is:

(i) correct that blog post
(ii) add a section to https://documentation.cpanel.net/display/PLD/Customize+Content+in+Paper+Lantern detailing the page-specific custom content (currently not mentioned at all).
 

cPanelAdamF

cPanel Product Owner
Staff member
Mar 21, 2013
296
135
168
Houston TX
cPanel Access Level
DataCenter Provider
Twitter

cPanelAdamF

cPanel Product Owner
Staff member
Mar 21, 2013
296
135
168
Houston TX
cPanel Access Level
DataCenter Provider
Twitter