-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Missing explanations #7
Comments
Hi Rafał, unfortunately the documentation is not quite finished. I'm working on providing some more examples, using the "extends" property. For registering a configuration you have to use the provided Nawork\NaworkUri\Utility\ConfigurationUtility::registerConfiguration method. Depending on which version you use (2.x or 3.0) you have to provide the hostname (2.x) or an identifier as the first argument. The second argument will the path, e.g. EXT:my_ext/.../. This is briefly described in the section below "Configuration" "Version 2.3 - 2.7" and "Version 3.0 and above". We use an extension that holds the templates and configuration for a site, so we just put the call for registering the configuration in its ext_localconf.php I hope this helps a bit. More examples are coming soon. |
Isn't it a bit complicated for an integrators ? Can't it be configured from Extension Manager ?
Is it a safe option ? |
One of the features of nawork-uri is, that you can have different configurations for different domains. Configuring this via the extension manager interface would be a mess, e.g. strange comma/colon separated strings with domains and config files. Therefore have we decided, that this is the most flexible and clean way to accomplish this task. If that is safe? I would say no. It is not planned, but I can't promise that the location/mechanism how the configurations are handled internally will not change in the future, e.g. with new TYPO3 CMS releases providing better ways for this. Even if this works now, I would not recommend it. The provided API would not change without further notice (e.g. new major version), but the underlying infrastructure might change in the future. Isn't there any file that is included after the extensions, or at least nawork-uri, are loaded, where you can place the method call? |
How can I config this per domain? |
Which version are you using? 2.7 or 3.0? |
2.7.5 |
According to the documenation (https://github.com/nawork/nawork-uri/wiki#version-23---27): Or, if you like to do it your way, which I still cannot recommend: |
OK, thank you for explanation. |
@thommyhh Could you now provide a working XML configuration using the "extends" Tag ? |
@SicorDev I will work on some more explanations. This is how it should work: Set But: As I took a look in the code, it seemed to me, that this could not work. I will work on this as soon as possible. If you want to try to dig into this yourself, start in |
@SicorDev I added examples how the configuration inheritance could be used on https://github.com/nawork/nawork-uri/wiki/Configuration-examples. This works in the current master. Could you try that and provide feedback. If this works as expected, I would then port the changes to back the 3.0 and 3.1 branches. |
Sounds good, i'm going to test the master branch in our project and provide some feedback. |
Just tested with the following 'extending' configuration: <?xml version="1.0" encoding="utf-8"?>
<nawork_uri extends="Standard">
<Parameters>
<!-- Languages -->
<TransformationConfiguration>
<Name>L</Name>
<Type>ValueMap</Type>
<Mappings>
<Mapping Value="4">
<Replacement></Replacement>
</Mapping>
<Mapping Value="0">
<Replacement>en</Replacement>
</Mapping>
</Mappings>
</TransformationConfiguration>
</Parameters>
</nawork_uri>
Works as intended, everything except the Language is used from the base configuration. I've cleared over 1000 lines of duplicate configuration with the extend option. |
Hi, yours extension looks very promising, thanks for your work and sharing.
I have some question at beginning.
During reading manual i read in configuration section
but i can't find anything about that in examples.
Second thing, in extensions like
cooluri
orrealurl
the main configuration file is located in configured (from EM) location, how this is managed in network-uri ?The text was updated successfully, but these errors were encountered: