CMS Development

diavolino
Participante

Access HubSpot File Structure with HubL

resolver

hi all

i was wondering if in hubl it was somehow possible to read/list e.g. the contents of files stored in a directory. i speak about the files that are uploaded with the hubspot file manager.

what i want to do is simply upload pictures into hubspot and then dynamically produce a website that shows all pictures that have been uploaded.

is that somehow possible?

in php i could do it e.g. with this script...

<?php
$dir 
"/tmp";
$dh  opendir($dir);
while (
false !== ($filename readdir($dh))) {
    
$files[] = $filename;
}
sort($files);
print_r($files);
rsort($files);
print_r($files);
?>

0 Me gusta
1 Soluciones aceptada
Jsum
Solución
Asesor destacado

Access HubSpot File Structure with HubL

resolver

@diavolino,

 

This this type of functionality would be useful. Hubspot runs on python instead of php (like other cms's) and you could do this in python BUT you can't actually use python. HubL is a subset of python that is basically a templating framework that is pretty stripped down to just being useful for making pages dynamic and editable. 

 

You might be able to do this using php and the Hubspot api. I don't know why it wouldn't be possible but I haven't tried to do this exact thing so I can't tell if you could or couldn't. Your account has to be set up to allow api use though. 

Ver la solución en mensaje original publicado

0 Me gusta
1 Respuesta 1
Jsum
Solución
Asesor destacado

Access HubSpot File Structure with HubL

resolver

@diavolino,

 

This this type of functionality would be useful. Hubspot runs on python instead of php (like other cms's) and you could do this in python BUT you can't actually use python. HubL is a subset of python that is basically a templating framework that is pretty stripped down to just being useful for making pages dynamic and editable. 

 

You might be able to do this using php and the Hubspot api. I don't know why it wouldn't be possible but I haven't tried to do this exact thing so I can't tell if you could or couldn't. Your account has to be set up to allow api use though. 

0 Me gusta