1. Can I use constants in config.yaml files?
Here's a old, closed feature request: https://forge.typo3.org/issues/81593
2. What's the best way to realize little differences in routing config.yaml files?
For Example:
rootPageId: <DEV-ID>
rootPageId: <PROD-ID>
With Typoscript this where easy with constants:
rootPageId: {$mainTemplate.rootPageId}
3. Why is it not possible to use the much better and more flexible TypoScript to do the routing-config with TYPO3 LTS-9?
4. Is there a "Backend yaml-Object-Browser" similar to the very good "TypoScript-Object Browser"?
ad 1) https://docs.typo3.org/m/typo3/reference-coreapi/9.5/en-us/ApiOverview/SiteHandling/UsingEnvVars.html might be the direction you want to follow
ad 2) why should a rootPageId differ by context? Perhaps the domain could/should differ, but the IDs should probably be the same, example: https://docs.typo3.org/m/typo3/reference-coreapi/9.5/en-us/ApiOverview/SiteHandling/BaseVariants.html
ad 3) I don't understand why a "why" is interesting - You can propose a feature request. However from my experience I didn't ever see a need for that. It is the other way around, probably you want to get site config from TypoScript: https://docs.typo3.org/m/typo3/reference-coreapi/9.5/en-us/ApiOverview/SiteHandling/UseSiteInTypoScript.html
ad 4) That one and UserTSconfig have no browser/viewer atm. Although it shouldn't be hard to implement one.
Related
I have been working with CakePHP which has model associations such as hasMany, belongsTom etc...
Now I am working with Joomla and need this type of functionality.
All I need is a point the right direction such as a link describing it as I cannot seem to find something about it on Google.
take care,
lee
There' is a world of difference between the two, and goes far beyond a simple answer on SO. The API Docs are quite extensive, and there are many decent examples. Developing a Model-View-Controller (MVC) Component for Joomla!2.5 will likely also give you some good reference. Additionally, with 9000+ open source extensions available, it's usually quite easy to find one that comes close to what you want to do in order to have some sample code to work from.
I am making a mutli-language site. I have seen that some websites have urls with languages in them like so:
http://example.com/en/homepage
I hear it is important for SEO, but I was wondering, doesn't that make it more complicated in terms of routing, URI, controllers, rather than just having a session/cookie that holds the desired language?
What are pluses and minuses of each way and which way should I go?
thank you
you could add some lines to your route config and to your core to do what you want.
Here are two links with a lot of information to implement this: http://codeigniter.com/wiki/URI_Language_Identifier/
http://sumonbd.wordpress.com/2009/09/16/develop-multilingual-site-using-codeigniter-i18n-library/
I'm building a site that allows users to make sense of a debate by graphically representing arguments for and against a particular issue. (Wrangl)
I'd like to categorise these debates so they are more easily found and connected. I don't want to irritate the person creating the debate by asking them to add tags and categories before they see any benefit, so I'm looking at a way of automatically extracting keywords.
What's a good approach for taking the debate's title and description (and possibly the content of the arguments themselves once there are some) to pull out, say, ten strong keywords that could be used as metadata to connect similar debates together, or even as the content of the "meta" keywords tag in the head of the HTML page where the debate is viewable. Eg. Datamapper vs ActiveRecord
The site is coded in Ruby with Sinatra, using DataMapper for data storage. I'm ideally looking for something which will work on Heroku (I don't have a way of writing files to disk dynamically), and I'd consider a web service, an API or ideally a Ruby gem.
Maybe you can use TextAnalyzer.
I understand that you're wanting to find an easy way of achieving this, I've recently dived into the world of NLP (Natural Language Processing) and Text-mining and its a daunting process of which most went far above my head.
Although i managed to code some functionality that resembles what you're looking for, though I did it in PHP. What i would suggest, that if you want it tailored to your project (Wrangl) then do it yourself.
Using the Porter stemming algorithm which I'm sure there will be Ruby code for.
Ruby Porter stemmer
You can try the salsaAPI to automatically extract keywords and categorize the debates!
Basically need to ask user a set of questions and gather information along the way. Each question could have impacts on different questions down the road. Another example would be turbo tax's web interface, answering yes on some ?s may trigger future questions.
Seems like this would be a fairly common problem in software so I guess I'm asking if there are any existing solutions/Design Patterns out there that could help. Kind of seems like a state machine, but I think that is an oversimplification.
State pattern
Look at this picture which helps with choosing correct fonts which is called So You Need a Typeface (big image there!).
It asks you numerous questions and at some point suggest you one or several answers.
As I understand you want to create something similar but interactive and about another domain.
So, you need to construct similar graph with branching-nodes and leaf-nodes. It can be done very conveniently with the Composite pattern. If you already have (know) all possible questions (or if you know that at some point you will know all of them and will be able to add them manually to the system) then it's the way to go.
If you want something more dynamic and intelligent then the solution can highly vary from case to case.
Are there any naming conventions or standards for Url parameters to be followed. I generally use camel casing like userId or itemNumber. As I am about to start off a new project, I was searching whether there is anything for this, and could not find anything. I am not looking at this from a perspective of language or framework but more as a general web standard.
I recommend reading Cool URI's Don't Change by Tim Berners-Lee for an insight into this question. If you're using parameters in your URI, it might be better to rewrite them to reflect what the data actually means.
So instead of having the following:
/index.jsp?isbn=1234567890
/author-details.jsp?isbn=1234567890
/related.jsp?isbn=1234567890
You'd have
/isbn/1234567890/index
/isbn/1234567890/author-details
/isbn/1234567890/related
It creates a more obvious data structure, and means that if you change the platform architecture, your URI's don't change. Without the above structure,
/index.jsp?isbn=1234567890
becomes
/index.aspx?isbn=1234567890
which means all the links on your site are now broken.
In general, you should only use query strings when the user could reasonably expect the data they're retrieving to be generated, e.g. with a search. If you're using a query string to retrieve an unchanging resource from a database, then use URL-rewriting.
There are no standards that I'm aware of. Just be mindful of IE's URL length limit of 2,083 characters.
Standard for URI are defined by RFC2396.
Anything after the standardized portion of the URL is left to you.
You probably only want to follow a particular convention on your parameters based on the framework you use.
Most of the time you wouldn't even really care because these are not under your control, but when they are, you probably want to at least be consistent and try to generate user-friendly bits:
that are short,
if they are meant to be directly accessible by users, they should be easy to remember,
case-insensitive (may be hard depending on the server OS).
follow some SEO guidelines and best practices, they may help you a lot.
I would say that cleanliness and user-friendliness are laudable goals to strive for when presenting URLs.
StackOverflow does a fairly good job of it.
I use lowercase. Depending on the technology you use, QS is either threated as case-sensitive (eg. PHP) or not (eg. ASP). Using lowercase avoids possible confusion.
Like the other answers I've not heard about any conventions.
The only "standard" I would adhere to is to use the more search engine friendly practice of using a URL rewriter.
There are no standards that I know of, and case shouldn't matter.
However within your application (website), you should stick to your own standards. For your own sanity if nothing else.