CMS Development

diavolino
参加者

Access HubSpot File Structure with HubL

解決

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 いいね!
1件の承認済みベストアンサー
Jsum
解決策
キーアドバイザー

Access HubSpot File Structure with HubL

解決

@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 いいね!
1件の返信
Jsum
解決策
キーアドバイザー

Access HubSpot File Structure with HubL

解決

@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 いいね!