after my first steps with FLUID POWERED TYPO3.
The latest versions flux 7.1.2, fluidpages 3.1.2, fluidcontent 4.1.1, fluidcontent_core 1.0.2, vhs 2.1.4
I've got only a small issue ... I don't see my Icons for FLUIDPAGES or FLUX CONTENT ELEMENTS at TYPO3 Backend.
This is the Icon Path for Fluidpages-Images from Screenshot:
typo3conf/ext/mvz_neuhann/Resources/Public/Icons/Page/Standard.gif
I try it with or without baseURL nothing happens. The Icon is visible, when I paste the path into my Browser:
But my JS-Console says:
http://mvz.local/typo3/typo3conf/ext/mvz_neuhann/Resources/Public/Icons/Page/Standard.gif 404 (Not Found)
Because of the 'typo3/' after my URL. But why? I'm on a local Server, no File Permissons or sth., Clear Cache, delete typo3temp.
Nothing. I can't see my Icons from my provider Extension via fluidpages or flux. It's the same with my FLUX Icons, the Standard-Icon is availible but how is the path at my flux form?
I've tried:
<flux:form id="home05" options="{group: 'xy', icon: '{f:uri.resource(path: \'Public/Icons/Content/myicon.gif\')}'}">
// or
<flux:form id="home05" options="{icon: 'typo3conf/ext/my_extension/Resources/Public/Icons/Content/myicon.gif', group: 'xy'}">
//
<flux:form id="home05" options="{icon: 'EXT:my_extension/Resources/Public/Icons/Content/myicon.gif', group: 'xy'}">
While in the backend, Flux creates a relative path to your Icon. To be precise, it creates a relative path to PATH_site constant. This means in your iframe, the path is plain wrong. This is a common issue with backend images. There's a few ways to solve this:
Create a custom, absolute uri with f:uri.resource and f:uri.image (absolute paths)
Example with proper escaping would be
<flux:form id="fluidpage" options="{icon: '{f:uri.resource(path: \'Icons/Content/myImage.gif\')}'}">
prefix your path with a slash if it's a custom Icon so the path will start at your root
There should also be automatic icon discovery which will find an icon Resources/Public/Icons/Standard.(png|gif) for your page Template Standard.html
If you have further issues, please refer to our bugtracker on GitHub.
Related
We had it already .. the missing icons at the fluidcontent-elements at TYPO3 Backend ... (here f.e.).
Now with TYPO3 7.6.2 LTSand the latest fluidcontent 4.4.0.
Sometimes the icons are there, but only on specific places, like Page -> Columns -> Overview
But not at the new content element - wizardor the page properties(images 2+3)
At the new page content wizard page its the following at inspect tool, Serverpath and my directory ../homepages/5/d11223344??/htdocs/mydir/typo3conf/ext/myext/Resources/Public/img/icons/MyIcon.svg
I also create a few Icons at the following folder: /typo3conf/ext/myext/Resources/Public/Icons/Content/Grid03ThreeCol.png for /typo3conf/ext/myext/Resources/Private/Templates/Content/Grid03ThreeCol.html - . I've tried png & svg ... nothing.
Is it a fluidtypo3- or a typo3 problem?
How do you do this?
After a few updates from fluidcontentor/and flux...
Now it works!
Your Template:
/typo3conf/ext/yourextension/Resources/Private/Templates/Content/Grid02.html
Your Icon:
/typo3conf/ext/yourextension/Resources/Public/Icons/Content/Grid02.svg
... the images ..
and
and
Open your /typo3conf/ext/myext/Resources/Private/Templates/Content/Grid03ThreeCol.html File and in find that icon path.
it will call from below line. Modify your icon path as per below code:
<flux:form id="" options="{group: '', icon: '../typo3conf/ext/myext/Resources/Public/Icons/Content/Grid03ThreeCol.png'}">
Clear cache from install tool and also from backend. And then check, it will work.
I'm working with the following paradigm for handling my CDN caching:
Each path contains "?version", for example: http://mycdn.com/some-javascript-file.js?123
The same paradigm is used for all of my resources (js, css, images), the problem I'm encountering is images paths in a css file.
For example, I have the following snippet in one of my css's:
"url (../../Images/example.png)"
The problem is that this image path doesn't use the version paradigm, I would like to add the version to the path somehow, is there a nice way to do this, except of the following methods:
1) For each image change - also change the css with some dummy version.
"url (../../Images/example.png?1)" - change 1
"url (../../Images/example.png?55)" - change 2
2) Transfer all of my css's files to be aspx files and to use the code-behind in order to define the version:
"<%= html.VersionUrl("../../Images/example.png")%>"
3) Use dotless lib: http://www.dotlesscss.org/
Any other simple/nice idea?
The best solution which I've found was to change the version tag to be at the beginning of the url and to use url rewrite in order to process the requests.
So if for example I used to had:
http://website/Content/Images/1.png?123456
this will become to:
http://website/123456/Content/Images/1.png
Notice that I use url rewrite in order the process the request so that http://website/123456/Content/Images/1.png will actually bring the data from http://website/Content/Images/1.png
A simple issue but unable to find a solution.
I have some image files that I placed in a subfolder called icons in my working directory in my ASP.NET website. I want to set an image during initialization to the markers on my Google map. But this isn't working. I have tried-
var marker= new google.maps.Marker({icon:'E:\cdeez\Sites\googletest 5\icons\busballon.png', position:pos,map:map});
It gives an error:
Not allowed to load local resource: file:///E:/cdeezSitesgoogletest%205icons%08usballon.png
However there is no problem if I place the image in the working directory. I guess giving the absolute path is not the right way too. So what is the right way in the above case.(Just a reminder- the above code will be in the aspx file).
According to the MarkerOptions docs, the icon should be a URL. However local files (embedded with file:///) tend to be ignored by browsers if the website is served over http - and I think that is what is happening in your case.
I would suggest to try out the following steps:
try using a relative path, e.g icon: "/icons/busballon.png"
try using a http path to your file, e.g. icon: "http://yoursite.com/icons/busballon.png"
I turned on URL rewriting on Drupal, and some URL image are broken.
For example :
local/tw/sites/all/themes/tw/images/1-p1.jpg become
local/tw/content/sites/all/themes/tw/images/1-p1.jpg
or
local/tw/sites/all/themes/tw/images/2-p1.jpg become
local/tw/node/sites/all/themes/tw/images/2-p1.jpg
Any ideas?
If you used relative path, and you're talking about contents within nodes, it's perfectly normal, since "node/" is interpreted like a directory.
You could fix this problem adding a "/" before image src, or using module like Path Filter that provides a simple file:relative/path/to/file syntax.
I've added some html code in my Blocks content and enabled Full HTML filter.
I've used relative paths for my images, such as "sites/all/themes/zen/zen/image.png"
I guess this is not correct because I need to change my paths depending on I'm in the home page or "node/id" page.
I guess I cannot use PHP inside blocks, thus I cannot use $base_url... how can add images path with only html ?
thanks
The previous answers provide a part of the solution, but here's a fuller scoop:
Hand-written HTML
If your site lives at example.com (i.e. it's the "root" site), then adding a front slash to your relative path will solve the issue, as others have suggested:
<img src="/sites/all/themes/zen/zen/image.png">
However, if your site lives at example.com/my-drupal-site, then you'll need to write it like this:
<img src="/my-drupal-site/sites/all/themes/zen/zen/image.png">
It really is better if you can use PHP to determine the appropriate path. If you're calling an image from a theme, you can use the Drupal function drupal_get_path to get the path like this:
$img_path = drupal_get_path('theme', 'zen') . '/zen/image.png';
And then you could be really Drupaly about it and use the theme_image function to generate the HTML for the image:
$img = theme('image', $img_path, 'My Image - Alt Text', 'My Image - Title Text');
Where $img now holds the HTML for the <img> tag and its src, alt, and title attributes. See the API documentation for drupal_get_path and theme_image for more information.
Point-and-click Solution
As jeffreymb points out, your easiest bet is to use a combination of a WYSIWYG editor and a built-in file handling module called IMCE to gloss over all these details for you. If you don't have access to the "PHP code" input format, this is the best solution.
So, steps:
Install the WYSIWYG module, as well as a WYSIWYG editor (I suggest CKEditor).
Install the IMCE module and IMCE WYSIWYG Bridge module, and enable the IMCE button for your WYSIWYG editor in its configuration settings for available Buttons.
See this post for a little more detail on that setup process, and make sure to read the documentation that the WYSIWYG module displays on its configuration page.
Once you have IMCE installed and integrated with your WYSIWYG, when you click the "Image" button in your WYSIWYG toolbar, your normal dialog should appear but with a new little icon to open the IMCE file browser. This file browser allows you to browse your files folder for images or to upload new files. It also supports a modicum of image manipulation, and will automatically generate the necessary HTML once you've selected an image.
I would recommend using the Pathologic module for this case. It is a filter that you can add to your input formats to convert relative URLs like that into proper URLs using your site's base URL. Plus it's useful if you have images in your RSS content as sites that re-publish the content (like feed aggregators, etc.) have the link to the full URL.
I use the CKeditor and IMCE modules to do this on my sites.
It is very user friendly and not that hard to set up.
Instead of the relative path, use the absolute path. So it'd be:
<img src="/sites/all/themes/zen/zen/image.png">
Note the slash at the beginning. The slash should be the only thing you need to do to convert your existing relative paths to absolute ones for use in straight HTML.
If you start your image paths with a slash ("/sites/all/themes/zen/zen/image.png") this will always be relative to your drupal root directory.
You could also simply select "PHP code" as the Input format, and use $base_url as you say.
I does this with cck blocks . The cck blocks is drupal module,it can put drupal fields into blocks