I wrote a small Frontend Plugin "Text+Image+Link".
If my editor choose a file link or an external Link, he also assign to open the target in a new window: _blank
In my Fluid-Tempalte I wrote
<f:link.page pageUid="{txtTarget}" class="btn btn-default">{txtLink}</f:link.page>
But there's no support to the link target, here's the output:
<a class="btn btn-default" href="http://kbs2015.com">Read more</a>
There's no target-attribute, but I chose it at Link Wizard (flexform): target:_blank !?
-
I try it like this:
<f:format.html><link {txtTarget}>{txtLink}</link></f:format.html>
There's the right link and target but no CLASS! Output:
Read more
-
How can I use target (from wizard) and two classes for a Link in FLUID?
DO I need a new ViewHelper? I don't know? Can I solve my problem with Fluid?
Thanks for your help.
( TYPO3 6.2.8 )
It depends on which TYPO3 version you use. TYPO3 7.0 has a new ViewHelper (TypolinkViewHelper) which handles Typolinks created with the link wizzard and respects link targets. In TYPO3 4.5 and TYPO3 6.2 there is no such viewhelper, so you should try to backport the viewhelper from TYPO3 7.0 to your extension.
Copy the content from the linked viewhelper to the Viewhelpers directory of your extension and adjust the namespace to match the one from your extension. Then you can use the viewhelper in your extension.
It won't work if I copied the TypolinkViewHelper from TYPO3 CMS 7.0
I've got always the error
Error Warning: Could not analyse class:Tx_MyExtension_ViewHelpers_Link_TypolinkViewHelper maybe not loaded or no autoloader?
I try it successfully with a Test-ViewHelper, but they not with the TypolinkViewHelper.php
Anyway ... I solve it with this FLUID-Snippet:
<f:format.html><link {txtTarget}><span class="btn btn-default">{txtLink}</span></link></f:format.html>
Related
I need to add a custom js file in my backend module of TYPO3 v7.6 extension.I added the following code in my layout
<f:be.container includeJsFiles="{0:'{f:uri.resource(path:\'Js/Main.js\')}'}">
<!------------ Contents ------------>
</f:be.container>
No error but the js file is not included in page source.Any other method is there to implement my requirement?
I would assume the path to the JS-file is wrong.
With your declaration it is expected to be EXT:your_extension/Resources/Public/Js/Main.js in your extension (as statet in the core sources).
But when in doubt I would try some other pathes. (full references)
We have one Plone site (4.3.x) using TinyMCE version 1.4.3, but we found that we should have the version 1.3.18 instead for this Plone version.
So I:
Uninstalled the TinyMCE package ( manage / portal_setup / import / Remove TinyMCE profile ).
Pin buildout version to 1.3.18 and run buildout.
Reinstalled TinyMCE package ( same procediment, but select TinyMCE install profile).
After that I notice that:
For default Plone content types it worked fine.
For the new dexterity content types defined in this Plone Site it didn't work. It load just a textarea with html into it instead of load TinyMCE.
I did many tests on this, and what I can see is that my content type should use wysiwygEditorBox macro from this template Products/TinyMCE/skins/tinymce/tinymce_wysiwyg_support.pt but instead it is using this template Products/CMFPlone/skins/plone_wysiwyg/wysiwyg_support.pt.
I tried to change order of portal_skins but it just affect Archetypes types, not Dexterity types.
What step should I do next? is there any better way to debug it instead of adding <span> tags with debug messages?
Looking in the parts/omelette directory shows the following in plone/app/form/widgets/wysiwygwidget.pt (line 21)
support_path string:nocall:here/${editor}_wysiwyg_support|here/${editor}/wysiwyg_support|here/po
My guess is that ${editor} isn't set right (ie to tinymce) so the above line is falling back to search for the wysiwyg_support.pt template.
I'm new to Kentico and am using version 9 for a website. A graphic designer asked me if I could create a macro or code that adds the page type of a page to the body tag as a css class. Has anyone done this before?
Following is a macro, that gives you page type info object:
{% DocumentContext.CurrentDocument.NodeClass #%}
Go to System -> Macros -> Console to see/try available macros.
<body class="{% CurrentDocument.NodeClass.ClassName.ToString() #%}">
I use Kentico 8.2 version and I can get this using:
<body class="anotherClass {% ClassName #%}">...</body>
Maybe this work also in Kentico 9.
Hope this help!
DocumentContext.CurrentPageInfo.ClassName
I know how to define static, standard code templates in NetBeans and I am wondering whether it's possible to define more customized and dynamic templates.
For example, when i type div.className to generate me a HTML <div> element with the class I specify.
Start netbeans and go-to: Tools->Plugins menu,Available Plugins tab, then search for Zen Coding hit install.
type: div.className and hit: ctrl+alt+n to get: <div class="className">
You will notice the new Edit->Zen Coding menu.
Installation & usage: https://github.com/lorenzos/ZenCodingNetBeansPlugin#readme
Read more about Zen Coding at: http://code.google.com/p/zen-coding/
I have created a page in typo3. Created and install extension through Extension kickstarter. Add this newly created extension on my page. But the extension is not showing up. Do anyone has any idea? Is template file needs to be defined?
Make sure you have included the Typoscript of the extension as well.
Usually it's done via 'Include static', the installed extension should be within the available items.
I added this line on the setup template of the page and it resolves my problem
page.40 < plugin.tx_test3_pi1