• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
Locked
0

Liquid: Reference current page template

Explorer ,
Oct 01, 2017 Oct 01, 2017

Copy link to clipboard

Copied

Scenario: I'm using Liquid to customise a WebApp detail page for an item, and I want to do something specific dependant on the page-template that this item has been configured to use, or the default template for the WebApp if none specified.

All I need to know is the value of the 'Template' field on the WebApp item and optionally the 'Default Template' field on the WebApp itself.

I want to do this at the server with Liquid, but can't for the life of me find where those field values are made available.

I'd be willing to use the Module_Data if it worked for WebApps, but it doesn't seem to.

Anyone?

TOPICS
Developer

Views

302

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Oct 07, 2017 Oct 07, 2017

Copy link to clipboard

Copied

unfortunately you’re not gonna be able to display any content related to the template assigned to a web app, at least not yet.

You can create a custom field in your webapp like a select dropdown with the list of the templates you have available, then, on custom liquid you can show your specific content based on your template for the specific WA also to minimise use {%case%} rather than {%if%}{%elseif%}.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Oct 17, 2017 Oct 17, 2017

Copy link to clipboard

Copied

LATEST

Thanks for the confirmation.

I know I could put my own field on there, but I was trying to avoid duplicating data already on the item.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines