Forum Discussion

ebroyles's avatar
12 years ago

How do you control the custom content that may appear on a custom page?

Lithium supports the ability to override core pages and also create custom pages (see http://lithosphere.lithium.com/t5/developers-knowledge-base/Creating-a-Custom-Page-in-Lithium-Studio/ta-p/6254).  Custom pages (aka custom page types) do not currently live within the community structure, which means that you cannot make use of Custom Content modules on the page (e.g. Custom Content 1, Custom Content 2, etc. as found in Studio).

 

I have a use case for doing just that.  What is the mechanism by which this can be done in Lithium?

7 Replies

  • SeanA's avatar
    SeanA
    Lithium Alumni (Retired)
    12 years ago

    Hi,

     

    Can you clarify the problem you are running into? I just created a custom page and added custom content to it all via studio. Perhaps we are doing it differently?

  • ebroyles's avatar
    ebroyles
    Maven
    12 years ago

    Hi Sean,

     

    Thanks for your response. I am able to add Custom Content components to the custom page type, however I do not know how to populate that custom content.  Since the custom content is controlled via the community structure, and the custom page type is outside of the community structure, I see no way to populate the Custom Content X components that are on the page.

     

    Eric

  • SeanA's avatar
    SeanA
    Lithium Alumni (Retired)
    12 years ago

    Ah, those are defined in Admin. Do you have access?

     

    Admin->Content->Custom Content

  • ebroyles's avatar
    ebroyles
    Maven
    12 years ago

    Yes, I do have access, but the problem is that the custom page type does not live in the community structure, so you cannot edit custom content for it.

     

    To see what I am talking about, follow these steps.

     

    1. Login to Studio
    2. Click Page -> New
    3. Give the new page a name (e.g. MyTestPage) and click Create
    4. Click the X to close the popup
    5. Add Custom Content 1 to the layout (select Custom Content -> Custom Content 1) from the Components list
    6. Save the page
    7. Navigate to the page (/t5/custom/page/page-id/MyTestPage)
    8. Notice that there is no content in the Custom Content 1 component

    I want to know how I can populate that Custom Content 1 component on that custom page. My theory is that since the custom page is not within the community structure, you cannot navigate to it via Admin, which means you cannot populate the Custom Content 1 component on that page. I will be thrilled if someone can disprove my theory.

  • SeanA's avatar
    SeanA
    Lithium Alumni (Retired)
    12 years ago

    Hmmmm. that is very strange because that is exactly what I did and my custom content does show in my custom page.

  • SeanA's avatar
    SeanA
    Lithium Alumni (Retired)
    12 years ago

    no worries, happy to help, glad you got it working!