Local server - can we use modules?


#1

I decided to give HubSpot local server a go as using our own IDE and developing locally are obviously advantageous compared to coding in the browser.

I’m struggling to see what I’ve gained though. I can view my template - and I can use simple {% hubl %} code for an if/else statement for example - but when it comes to using a text module for example - I get no output.

Take the following example:

{% text "my_text_module", label="my module", value="here is my text" %}

Using the above in my local template generates no output. I’ve also tried with export_to_template_context and still no output.

If I can’t add Hubl modules - what’s the point in the local server, I’m just coding plain HTML that I’ll have to alter and add Hubl to when I upload to HubSpot?

I hope I’m missing something here!


#2

Any HubSpot tech guys able to clarify if modules can be used? Thanks


#3

Hi @craigivemy,

After doing some testing locally, I wasn’t able to reproduce the issues you’re seeing with the example you provided. Are you running the most current version? Additionally, could you try omitting the comma after "my_text_module"? I found that would throw errors in older versions.


#4

Hi @Derek_Gervais - I’m running 1.0.14 - which I downloaded from this page - http://designers.hubspot.com/docs/tools/local-hubl-server

I’ve tried removing the comma too, still no output.


#5

Hi @Derek_Gervais I updated Java SDK - all seems fine now!

Out of interest - there’s no edit page functionality for local server, am I right? So you can’t edit the page as though you were creating a new landing page within HubSpot?


#6

Hi @craigivemy,

I’m glad to hear the local server is functioning correctly after an update! Regarding the edit functionality; you’re correct, to actually create/edit a page based on a template, you’ll need to access your template in HubSpot.