"Export to Folder" code block only resource files |
Post Reply | Page 12> |
Author | |
leroyle
Newbie Joined: Jan 07 2020 Location: Richardson, Tx Status: Offline Points: 12 |
Post Options
Thanks(0)
Posted: Feb 11 2020 at 6:54pm |
Hi,
I have some resource files, images and audio mp3 files, that are referenced within code blocks but are not referenced from/used by any OE elements. For instance one code block uses the html <audio> element to present an mp3 file for playing. <audio controls> <source src="myaudio.mp3" type="audio/mpeg"> </audio> When I "Export to Folder" the audio file is not copied into the export folder Files/Audio/. If I link that audio file to an element, button for instance, then it is exported to Files/Audio/ as we might expect. So I could use hidden elements to force the export. Is there another way to "force" these types of "code block referenced only" resource files to be exported? I've tried searching this forum be came up empty. Thanks.
|
|
digizar
Senior Member Joined: Dec 30 2015 Location: Germany Frankfu Status: Offline Points: 742 |
Post Options
Thanks(0)
|
To 'activate' resources/images, ... they have to be 'imported' fom original location into oe resources. If you use those resources from outside of oe, they are not known to oe. Not transferred and not updated, just unknown. That condition of oe is by far not known. But it's an important key for the usage of oe. So, whenever you'd need a resource/image/sound/clip to be implemented on oe, it is required to transport/invoke that to the resource(s). The further advantage is, that the original of that image is kept anwhere, it will never be touched (just copied to oe). The access will always be through oe internally. It is 'embedded'. Oe could not find it else, because it is also not transferred to the server. How to establish that? Don't be scared, it's simple. When you see the symbol for implementing a resource (screen shot 1), that button leads you to the resources part of oe. You select a resource (image) from there only. That makes that image known to oe. And it includes that particular resource into the optimization process (manually triggered), but leaves the original(s) untouched (Preferences ... Maintenance, ...). If you do not yet have such resource there, you may add it (screen shot 2). Pull that wanted symbol/image from the original place, add it to the resources. It's just copied. That leaves the original intact. Only oe has internal access to it via the resources. Very nice. You may even delete that resource/mage at the original location, it is still known to oe. One thing else, you might consider (screen shot 3). To keep an order to find resources already existing in oe's resources, I urge you to create some correspondingly named *Folders*. You may easily create any *folder* (New Folder). There are exceptions. Some entities/resources have to go to the *Other* ... folder(s), you'll find out (screen shot 4). Be careful to give meaningful names, because it's not so simple to change the folder names. Be acquainted with the resource handling, that helps alot. Usually it is not required to manually coding in oe for resources. I made the same mistake, referenced the resources from original location only. But I was not really happy. It is a pretty simple process - once you know the beef. Recently I put my sample project online for free usage. That might give you more info. It might help you. https://forum.openelement.com/en/forum_posts.asp?TID=1622&title=sample-website Screen shot 1 Screen shot 4 Edited by digizar - Feb 12 2020 at 1:48am |
|
___________________________________
Ask questions only if there is no answer yet. https://blumendigi.com |
|
leroyle
Newbie Joined: Jan 07 2020 Location: Richardson, Tx Status: Offline Points: 12 |
Post Options
Thanks(0)
|
Thank you Digizar,
I did "catch" my self copying the files as a temporary test into $project/Files/Audio. But once I recalled that was not correct I then removed them, then, 1. clicked on the "project" tab, then the Resources icon 2. clicked on the "audio" tab 3. created a couple of folders as you suggested, 4. and then "Add Audio Files" within the newly created folders 5. I exited the Resources dialog and re-entered it. I verified could see the newly added folders and their audio files. Then I clicked on the "Export to Folder" icon to run the export again. Once complete I do not see the audio files within the exported Files/Audio folder. If I then, 1. add a text link to my page 2. then at the "Link Configuration" dialog which pops up 3. select "File" as the destination or script 4. at the Resources dialog that pops up, I can navigate to the Audio tab and down my created folders 5. I can select one of my audio files that were added in the above steps 6. then click "Ok" at the Link Configuration dialog 7. save all pages Now if I "Export to Folder" I can see within $project/Files/Audio the audio file associated with my text link, but I do not see any of the others. Using the project tab, Resources icon was the only way I could see to bring the files into my project. Is there another way I should be using so that all of my files get exported even though they are not explicitly associated with an OE element, but are referenced within custom html within a code block. Or, must the files be referenced by an OE element in order to be eligible for export? thanks again |
|
Hobby001
Admin Group Joined: Jun 05 2018 Location: Canada, Québec Status: Offline Points: 6209 |
Post Options
Thanks(1)
|
OpenElement creates some sort of databases that list the elements to include into the export. When you use code block to include a file into your pages OE doesn't know it. If you use Project=>Resources to import these files into OE, you can also use Project=>Resources then select files and use the publish button to export them. |
|
digizar
Senior Member Joined: Dec 30 2015 Location: Germany Frankfu Status: Offline Points: 742 |
Post Options
Thanks(0)
|
Edited by digizar - Feb 12 2020 at 1:11pm |
|
___________________________________
Ask questions only if there is no answer yet. https://blumendigi.com |
|
Hobby001
Admin Group Joined: Jun 05 2018 Location: Canada, Québec Status: Offline Points: 6209 |
Post Options
Thanks(1)
|
I just designed a new element for MP3 / OGG files
You can download it here: https://denislafrance.net/Element/Audio.en-us.htm Built from HTML5 standards for OpenElement, if you use it, OE will know the audio file and export it Currently it is minimum, It allows for MP3 and OGG and is limited to full controls, I will add options later today. Procedure:
Edited by Hobby001 - Feb 12 2020 at 1:48pm |
|
leroyle
Newbie Joined: Jan 07 2020 Location: Richardson, Tx Status: Offline Points: 12 |
Post Options
Thanks(0)
|
Thanks Hobby001,
My "normal" workflow at this point is to "Export to Folder" then copy those files up to the web server as sometimes they go to a production location, sometimes to a test location. Once I setup my publishing configuration correctly, I can indeed "publish" the resources within the Resources "File Library" dialog. This does push them up to the web server. But I suppose all go, even those not currently "desired" by the developer, but we could pick and choose individual files I suppose. But they will still not make it to the "Export to Directory" location.
|
|
leroyle
Newbie Joined: Jan 07 2020 Location: Richardson, Tx Status: Offline Points: 12 |
Post Options
Thanks(0)
|
Hobby001,
I'll give your new element a try, thanks. If I do not use that I'll just associate the audio files with a hidden element. Then they will seamlessly go along for the ride. Thanks again to you both for your help.
|
|
Hobby001
Admin Group Joined: Jun 05 2018 Location: Canada, Québec Status: Offline Points: 6209 |
Post Options
Thanks(1)
|
The new element makes OpeneElement to add the image to the ressources and to publish the targetted image to the server automatically.
|
|
leroyle
Newbie Joined: Jan 07 2020 Location: Richardson, Tx Status: Offline Points: 12 |
Post Options
Thanks(0)
|
The audio element does the trick. I can toss my code block.
Thanks much. (Guess I should learn how to add elements but I'm not big into the web side of things. )
|
|
Post Reply | Page 12> |
Tweet
|
Forum Jump | Forum Permissions You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |