CMS Development

DavidFJones
Member | Platinum Partner
Member | Platinum Partner

Links between Multilevel Dynamic Templates and other coded Templates

Hey all,

I am working on a theme that uses both a Multilevel Dynamic Template and several other coded templates, and I'm wondering how/what the best way to link between them would be. For example:

 

Pages A, B, C and D are all made using a multilevel dynamic template and nested within each other, starting with A as the highest level and working downwords.

I have another page made with another template, lets call this Page 1. Page 1 needs to have a links on it to pages A, B and C.

Since Pages A, B and C are all made using a multilevel dynamic template, I am unsure how to create these links to them without hardcoding the value into my theme. 

Thank you.

0 Upvotes
7 Replies 7
sharonlicari
Community Manager
Community Manager

Links between Multilevel Dynamic Templates and other coded Templates

Hey @DavidFJones  

 

Could you please the URL for the website you are working on? With this information the Community will be able to assist you Emoticono feliz  

 

Thank you

Sharon


Did you know that the Community is available in other languages?
Join regional conversations by changing your language settings !




0 Upvotes
DavidFJones
Member | Platinum Partner
Member | Platinum Partner

Links between Multilevel Dynamic Templates and other coded Templates

So, here is the first set of pages - https://www.thesuccessfulbookkeeper.com/tsbk-lms . This is build using a multi level dynamic template. If you select "Begin Course" on Course 1, you can go through each of these nested pages just fine.

Then there's the dashboard page - https://www.thesuccessfulbookkeeper.com/dashboard
This is currently using it's own theme page. If you look on the dashboard page there are several shared links, such as the begin course buttons. These buttons currenlty do not link from one theme page to the other however (from dashboard to tsbk-lms)

Thanks! 

0 Upvotes
stefen
Key Advisor | Partner
Key Advisor | Partner

Links between Multilevel Dynamic Templates and other coded Templates

@DavidFJones I'm not too experienced with the multi level dynamic pages but you could always use the standard HubSpot navigation menu for that. Would be better than hard coding into the template files since that's at least user facing / editable.

Stefen Phelps, Community Champion, Kelp Web Developer
DavidFJones
Member | Platinum Partner
Member | Platinum Partner

Links between Multilevel Dynamic Templates and other coded Templates

So I went in and added a simple menu with the intent that the user would add a single link to this menu. This link would go to the multilevel template.

From here the plan is to use js to grab this url and append that to all the links on the page that need to go somewhere within that multilevel template. 

Could there be any unforeseen circumstances with this method?

0 Upvotes
Kevin-C
Recognized Expert | Partner
Recognized Expert | Partner

Links between Multilevel Dynamic Templates and other coded Templates

Hey @DavidFJones 

Pardon my reply if I'm totally off base.

 

So I think I finally understand you use case (mostly a time thing not your description):

 

On Page 1 you would like deep links to your dynamically built pages A, B, C, and D.

 

Using the how-to-build-multilevel-dynamic-templates example I can illustrate how:

 

You can anticiapte these URLs with 100% accuracy. When creating the tables URLs are defined  with the "PAGE PATH" in the example:

Screen%20Shot%202018-10-10%20at%2010.46.44%20AM.png?width=2292&name=Screen%20Shot%202018-10-10%20at%2010.46.44%20AM

So your root URL is page1.com, for example. To reference "Food" you would append the path "/food". The URL would be page1.com/food

 

And an identical structure for level B:

Screen%20Shot%202018-10-10%20at%2010.49.37%20AM.png?width=2486&name=Screen%20Shot%202018-10-10%20at%2010.49.37%20AM

To get to apple you'd append the "/apple" path to the existing URL: page1.com/food/apple

 

The child paths are defined identically, so you can just keep adding the the "/ *path*" to get to the correct level from anywhere.

 

You case sounds very complex strickly due to the number of pages and not necessarily thr technology to create it. When we buil;d something like this we always build a journey map or a spreadsheet that shows all the parent child relationship of our content:

Page1    
  A  
    A.1
    A.2
  B  
    B.1
  C  
Page2    
  D  
  E  

 

With one of these visuals you can see exactly what your URL structure will need to be.

 

 

TL;DR

Not sure how you planned to use JS to append URLs, but it shouldn't be necessary if they're being coded. Visualize your page structure so you can see whats where when authoring. To insert these without hard coding just create a custom module that would allow a user to select a path via drop down or manual entry.

 

I hope this helps! Obvisouly I'll be around to help if needed.

Kevin Cornett - Sr. Solutions Architect @ BridgeRev
DavidFJones
Member | Platinum Partner
Member | Platinum Partner

Links between Multilevel Dynamic Templates and other coded Templates

I think we have found a solution. So looking at the original url - https://www.thesuccessfulbookkeeper.com/tsbk-lms

it doesn't matter what comes after the tsbk-lms part. IE: https://www.thesuccessfulbookkeeper.com/tsbk-lms/pizza , https://www.thesuccessfulbookkeeper.com/tsbk-lms/apples, https://www.thesuccessfulbookkeeper.com/tsbk-lms/lesson-15

So since the domain is the same, and the multilevel template is able to grab the unique slug for the end of the url, the only problem area was that "tsbk-lms". So if we change this to something like "course", and then just require the user to make sure that the courses page has a slug of course, we can hard code that one value in and it will always pull up everything else correctly. 

sharonlicari
Community Manager
Community Manager

Links between Multilevel Dynamic Templates and other coded Templates

Thanks @DavidFJones 

 

Hey @Chris-M @stefen @Kevin-C  could you please share your thoughts with @DavidFJones?¿

 

Thanks

Sharon


Did you know that the Community is available in other languages?
Join regional conversations by changing your language settings !




0 Upvotes