Problem with file_list extension of Typo3 - typo3

I am pretty new in Typo3 world.
I'm trying to list all the files in a folder and parse them one by one. To list the files, I'm using "file_list" extension (https://docs.typo3.org/p/causal/file_list/2.4/en-us/Index.html) and following the image gallery tutorial (https://docs.typo3.org/p/causal/file_list/2.4/en-us/AdministratorManual/ExampleGallery/Index.html). To this end, I have created a folder at "/fileadmin/user_upload/test" and created three empty files in it for test purposes.
I have created these 4 files just as described in the tutorial:
ext_emconf.php
ext_icon.png
ext_localconf.php
ext_tables.php
This is the content of my "Configuration/TypoScript/setup.typoscript" file:
plugin.tx_filelist {
view {
partialRootPaths.100 = EXT:my_gallery/Resources/Private/Partials/
}
settings {
path = file:1:/user_upload/test/
mode = FOLDER
}
}
I have also created MyGallery.html under "typo3conf/ext/my_gallery/Resources/Private/Partials" with the same content as in the tutorial.
I have the file "typo3conf/ext/my_gallery/Resources/Private/Templates/Default.html" which includes one line:
<f:render partial="MyGallery" />
In Typoscript backend, I have created a page with a template and included "My Gallery(my_gallery)" and "File List(file_list)" static extensions in it.
The setup section of the page includes:
page = PAGE
page.10 = FLUIDTEMPLATE
page.10 {
templateName = Default
templateRootPaths.1 = typo3conf/ext/my_gallery/Resources/Private/Templates
partialRootPath = typo3conf/ext/my_gallery/Resources/Private/Partials
}
Now my page renders the template and partial in the frontend (I could confirm this by injecting dummy content) but does not show any folder list. According to the HTML template, I assumed there should be a "files" variable passed to the page, but when I reviewed the debug information, I could not even find such a variable.
I need help to parse the folder content in the frontend HTML file.

Not tried it myself, but after a quick look into the documentations you linked.
Assuming everything was done corretly regarding the documentations, the point what you missed is following:
In the backend, in the page module, on any page create a new content element. There should be the filelist plugin. In the plugin option, there should be a option, where you can select your created "My Gallery" template.
Filelist is an extbase plugin. So it must be placed in a page. As alternative, you may add a typoscript to directly render a plugin instance into a template variabel, you can place / output in the template. Or in any template.
The first and easier option would be to place it in a page as content element.
If you want it as variable, you can create / rendet it as shown in the filelist documentation on https://docs.typo3.org/p/causal/file_list/2.4/en-us/AdministratorManual/BestPractices/TypoScript.html
If you add such a snippet to typoscript (propely modified to match your stuff).
You can render it in the page template with:
<f:cObject typoscriptObjectPath="lib.filelist" />
But this would display it on every page.
For the start, I would suggest to go the "put it as an content element on a page" way.
edit 1 / answer on your comment
Maybe something went wrong or you missed, when you followed the gallery exampel on https://docs.typo3.org/p/causal/file_list/2.4/en-us/AdministratorManual/ …
Would suggest to check every step clearly.
Things, which came in my mind:
missing include of the default static template from the filelist extension/plugin on the root page / root template record
missing include of the static template from your dedicated extension (like in the example)
wrong order of the static includes (eventully)
not enabled your dedicated extension
missing cache clear
..

Related

Typo3 News Extension - Global News Link Custom per Partner

I have the following problem. We have stored several websites for our partners in a Typo3 installation.
We have set up the site so that we bring global news for each customer to their website. If I now create a global message, it appears on the customer's website. Now we would like to place a separate link in the news for each customer. But apparently this is not possible.
Does anyone have any idea how to do that?
Thank you so much!
We use:
typo3 9.5.14
Extension: News System (news)
I am not sure, whether I understand you correctly.
You can easily use different templates for each customer by changing the paths to the template files in Typoscript for each websites:
plugin.tx_news {
view {
templateRootPaths.100 = EXT:your_extension/Resources/Private/News/Customer1/Templates/
partialRootPaths.100 = EXT:your_extension/Resources/Private/News/Customer1/Partials/
layoutRootPaths.100 = EXT:your_extension/Resources/Private/News/Customer1/Layouts/
}
}
Now you are able to set different links for each website.
Another way is to add a Typoscript variable in the settings section of the ext:news typoscript like this:
plugin.tx_news {
settings {
pageLinkUid = 123
}
}
And add the following link into your fluid template:
<f:link.page pageUid="{settings.pageLinkUid}">page link</f:link.page>
The link of the page can be changed with typoscript for each customer.

GitHub Pages - How to prevent conversion of file names to *.html in links

I am using GitHub Pages to create a static web site.
It does a great job processing links such that file1.md becomes file1.html in the rendered output:
For example:
[Link text](https://github.com/some-repo/some-file.md)
in the Markdown source becomes this when rendered using GitHub Pages:
Link text
Can I override this conversion somehow and link to an actual md file? In other words, output that looks like this:
Link text
Thanks for any insight you can lend!
I have tried embedding the HTML <a> element in the source, but the conversion still happens.
You can get the path to a particular page (.md file) using the page.path variable.
That path is relative to the branch directory in your repo.
So you can link to the .md source file using this URL:
https://github.com/YourUsername/YourRepo/blob/your-branch/{{ page.path }}
For my purposes, I use this URL:
https://github.com/KevinWorkman/HappyCoding/blob/gh-pages/{{ page.path }}
If you already know the path, then you can use that directly instead of using the page.path variable:
https://github.com/YourUsername/YourRepo/blob/your-branch/some/path/some-file.md

Magento external theme installation trouble

I'm trying to install a Magento theme.I am trying to install it by coping theme's app,skin and js folder into magento's app,js and skin folder.Theme works okay except the home page.
In homepage's content section i have add this:
<div>
{{block type="catalog/product_list" template="catalog/product/my_template.phtml"}}
</div>
which loads theme's template and sets its design but in my case it doesn't apply the template, What i lack here?
Other Pages like About us,Contact us are working according to theme but not homepage..
In the other pages which are working,content written in content section is directly a data,where in homepage it is a reference to a template called "my_template.phtml"..
help me guys!

How can I render a link on a Powermail confirmation/submit page?

I'm trying to place a link on the submit page of my powermail setup.
You'd think this is a simple task, but bear with me.
My Powermail form has 2 hidden fields which are prefilled with a page ID and a page title.
These belong to the page I later want to return to, after having sent the mail. By putting these values in the form, I hoped to have access to them whenever I need them in the process.
I prefill these hidden fields from TypoScript like so:
plugin.tx_powermail {
settings {
setup {
prefill {
// Hidden "back to" page ID. This is the page you may want to return to after sending a mail.
backto = TEXT
backto.data = GP:backTo
backto.if.isTrue.data = GP:backTo
backtotext = TEXT
backtotext.noTrimWrap = |Back to ||
backtotext.data = GP:title
backtotext.if.isTrue.data = GP:title
backtotext.htmlSpecialChars = 1
}
}
}
}
1. Approach
Given that Powermail claims you can now use Fluid ViewHelpers in your content sections, I though, great, let's use the PageViewHelper, like so:
{f:link.page(pageUid:'{backto}')}
But where does my link text go? More inline notation to the rescue!
{backtotext -> f:link.page(pageUid:'{backto}')}
Rendered Result
Seems like the inline notation is not fully supported. I thought I was smart by simply using:
{f:link.page(pageUid:'{backto}')}{backtotext}
But this leaves the <a> tag open, which has very undesirable effects...
So - No link for me!
2. Approach
So I thought I would simply construct the link in TypoScript and render it on the page via
{f:cObject(typoscriptObjectPath:'lib.myBackLink')}
But I can't see any way to access the variables from the (sent) Powermail form in TS. So I don't have access to the page ID or title.
3. Approach
So I thought, if the default PageViewHelper only wants to render its children as its content, maybe I can roll my own ViewHelper that accepts the content as a parameter!
But how would I make that ViewHelper known to the system so that I can use it in my customized Powermail templates?
I've only used Fluid inside of my extensions before. It was obvious how Fluid would look up the correct ViewHelper by name, by what if I want to use a ViewHelper in my fileadmin folder hierarchy?
4. Approach
So, why not just use a normal link by using {backtotext} in the RTE?
TYPO3 realizes, that that is an illegal reference, and quickly turns the link into:
And the resulting output will simply not be a link.
So, that doesn't work either.
OK, so I change the target to {backtotext} (removed a slash). Now the URL is no longer recognized as internal and is marked with data-htmlarea-external="1". This causes my link to actually be fully evaluated and rendered (yay).
But it is now treated like an external link, RealURL no longer affects it and it is subject to external link _target behavior.
Why is this so difficult? What am I not understanding?
In RTE you have to use <link ###pageid###> instead of <a href="...">.
Have a look into the RTE DB field contents (or hit the no RTE checkbox) on how to use the link elements.
As it turned out, none of the previously attempted solution actually worked.
To get things over with, I just replaced the web section in the PowermailAll template, like so:
Section for Web view
<f:section name="web">
</a>
</f:section>
And then I used the following in my Submit Page content:
{f:link.page(pageUid:'{backto}')}{backtotext}{powermail_all}
Problem solved. I guess...

Meta descriptions of frontpage items not working in joomla 1.5

When I view the page source the meta tags are fine, however when I try to share the website link (the problem is only with frontpage item) on Facebook, the preview points to "Joomla! ..." text.
I have also changed
Changed the global config file (that only ensures all other pages work fine except the frontpage item)
hardcoding the MetaDesc tag in *.php files.
Maybe I'm missing something very basic?
Have you tried removing the Generator meta tag from Joomla? The only meta data tag I know of that starts Joomla! is the generator tag. In Joomla 1.6 onwards you can remove this by adding a line to your template. In 1.5 however you have to edit the following file.
\libraries\joomla\document\html\renderer ~ line 84
As mentioned earlier, the Google problem should be solved by waiting for a while.
Facebook seems to need custom meta tags in order to work properly. There is a thread about it here. Also worthwhile checking out facebook developers section.
Your home website not show metadescription and keyword although you config it in Global Configuration .
Menu manager -->Home is Front Page Blog view.Try insert metadesc and keyword in file
I try using get values from configuration.php.But it not working with 2 parameter MetaDesc, MetaKeys.
Edit file yourwebsite\components\com_content\views\frontpage\view.html.php
$config = & JFactory::getConfig();
$document->setDescription($config->getValue( 'config.MetaDesc'));
Sumary I fix my problem like that,
Edit file yourwebsite\components\com_content\views\frontpage\view.html.php
$document->setMetadata(“keyword abc here”);
$document->setDescription( "Description about your website" );
Hope this help someone have some problem's.My name is vanhien771354
www.nhipcau.us