I have a blog-like part of an page using TYPO3 / TemplaVoila. There are articles that should show up summarized on a single page, but have their own pages / URLs each one too.
However, having the editors add a page AND a flexible content element for each entry is complicated.
So is it possible by some typoscript to have a page, showing a single content element from some other page, sporting a proper URL without having to setup an extra page for each element?
What you want is doable without TV and with other records than tt_content.
e.g.: ext:news does it: the content are news records, which are shown with plugins in list- and detail-mode.
Of course you can reinvent the complete logic of such an extension so you can do it with tt_content records, which could be stored in the usual way scattered on multiple pages.
But the logic is clearer if there only is one page (or very few pages which represent some categorization) where special records are stored.
Plugins would be configured to show only selected records (from one category, which are marked top, which are current, ...) and you have one page (one for all and not for each news one) where the records are shown in detail.
Also each has it's own URL, either with URL-parameter (by default) or you configure realurl (or similar) to build a "real url" from news title (and uid).
Related
We have a requirement to create a News Component. So there will be news pages which we will author contains Title, Image & description. I will store this under one node say content\myproject\newsnode\news1,news2 like this.
On the homepage, I want to show the latest 3 authored news description. For that, I'm thinking of using a news component.
I thought of creating 2 component and map them. Thinking of using the Query builder to fetch the latest news to show on homepage. One component of news page and one component on a homepage to show latest 3 news with Title, Tile image and a small description.
Is there any other approach to this?
If you are using a dispatcher, querybuilder servlet is blocked by default and should be blocked for obvious reasons.
Since your question is general, I will try to answer generally and on a high level.
There are two possible options I can think of:
1. make a servlet to retrieve the last 3 news component information and expose them as JSON. Then send an AJAX request from your browser and change the view accordingly with jquery or your front-end framework of choice.
Advantages: No caching, you'll always get the latest news.
Disadvantages: SEO, if you care about that in this case. Search engines will
not index the news on the page since they are not part of the initial markup (not server-side rendered)
2. Create a service to get the last 3 news component info then render them on your component via HTL or JSP. Basically server-side render them.
Advantages: SEO, same as the reason above.
Disadvantages: You have to invalidate the cache for your page every time a new news component is added to make sure your end users get the latest.
Hope this helps.
TYPO3 7.6.16 ext:news 5.3.2
We're looking to create a json stream of news stories that have been created in the CMS so that we can consume the feed in other applications. For each element in the feed we're looking include some simple properties such as the news story name, when it was published and a link to the news story, so that we can direct someone back to the relevant page on the Website.
We've been able to return a list of news stories by querying the tx_news_domain_model_news table. From this table we've been able to query all the information that we need from the story, but we're having trouble building a link to the story.
The links that the news plugin is building for each story at the moment takes the form:
/story/tx_news_pi1%5Bnews%5D=18&tx_news_pi1%5Bcontroller%5D=News&tx_news_pi1%5Baction%5D=detail&cHash=a6e542381e508c0501a09383cedc4d70.
So the id field of the news story field is included as a parameter. We've tried making links by adjusting this parameter for the various Ids of different news stories, but each link allways returns the same news item. So we are assuming that the hash value for each nwes story has to be calculated for each item to find the correct story.
Our question is. Is it possible to build a unique URL for each story based on the information in the tx_news_domain_model_news table or is there a better way to create a JSON feed for each news story which includes the link to the original article.
You could define a special page rendering. either a new page or a new pagetype of an existing page.
You use a page object and instead of the usual include of a template the whole content is generated by a CONTENT object. With this you select all news records and define a renderobject where you can use FLUIDTEMPLATE or build up the rendering in typoscript.
In this way you can generate 'normal' URLs, which also might be niced by realurl.
If you want to output other formats than HTML you propably need to escape string-delimiters in your texts and strings.
Fluid templates may be a little bit complex if you have a format where whitespace is important. In typoscript whitespace can be handled with stdWrap.noTrimWrap
it is possible to have a direct path to a special news entry?
example:
my link is: http://www.domain.de/start/topnewsdetail/news/really-long-name-of-news-entry.html
and it would be nice to have
http://www.domain.de/newsEntry.html.
Can someone give a hint?
it is a little bit complicated if you want a general automatic solution.
you can do it by hand if you insert pages of type 'external url' where you insert the long path as external url.
with realurl you have problems as realurl at least will use one path segment for the page with the detail view before the last segment which is for identifying the news record. AFAIK coolurl can ommit the path segemnt for the page.
on the other hand: make sure the news identification (title, subtitle?) is unique and does not collide with pathes for normal pages.
at last you can use .htaccess rewrites, but that needs to differentiate between short urls for news and short urls for top-level pages. So those urls will show the page, those urls are not generated inside of TYPO3 and so nowhere used (except manual)
this EXT. adds a custom link to records like system category or news:
https://typo3.org/extensions/repository/view/recordlink
It'S deployed for TYPO3 6.2 but perhabs it'S helpful to create an own EXT.?
We have bunch of Confluence pages for each team to note down the leaves. Each such page consists of a table with team, team member name, month, week ..etc.
Now we want to have a consolidate page which shows information about all the teams in a single page. Can we create a consolidated page which uses the content in all other pages?
I read about macros but couldn't understand how they can be used. Is it possible to use content from one page in another page dynamically?
Yes you can by using the "Excerpt" macro (to mark one section in a page as "insertable" and use this in another page). If you need to have multiple sections in one page to reuse in other pages, there is also a "Multi Excerpt" macro.
So, for example, if you have a page with a few lines of text, you can basically insert the excerpt macro and paste all content into it that you want to reuse on other pages:
(source: imagestack.net)
(in this case I want to reuse "line 2")
In another page, you can reference this marked content by inserting the "Excerpt Include" macro and specifying the page you want to take the marked content from:
(source: imagestack.net)
The result in this case is
I am very news in WordPress world and I am finding some difficulties with creation of a personal template.
I want implement a blog like this one (that is do using WordPress): http://viralpatel.net/blogs/
My blog have to be simplest and there must be only two coluns: one for the last posts and one for the more visited post
So I am started from an existing template (named Coogee) and I have divided the content area (the index.php file) into two columns: the first one that show the new posts and the second one that show the most read posts.
I have implement this features with some lines of code that I have put in my columns as show here:
http://bacsoftwareconsulting.com/blog/index.php/wordpress-cat/how-to-display-most-viewed-posts-in-wordpress-without-a-plugin/
Ok, now the homepage look good for my intents but I am having some problem in the categories page.
For example if you click on the "generic" link on Categorie menù in the side bare you obtain this page: http://scorejava.com/wordpress351/?cat=2
In teory this page have to show ONLY the articles that have "generic" as setted category but this is not true, infact in the left column are correctly showed the articles having "generic" category setted but in the right column still remain the last 5 posted articles...
And now I have a question...seems that WordPress use this index.php file as template of the content area of all page (except the one that displays a single article that uses **single.php file)
This is not good for me because I want that a category page show only one big column with the last articles of the current category, as here: http://viralpatel.net/blogs/category/spring/spring3-mvc-framework/
As you can see in this blog there is more columns in the homepage but only one column for the category page
I would know if:
**Exist a way to define an other structure (different from the index.php file used for the homepage articles content) for the catecories page?
If I can't use an other structure for the categories page and consequently I have to use the same index.php file also per the categories content page....there is a way to show the second column only if the visitor is in the homepage and don't show it if he is in a category page (do not show it if the visitor is in a pge like: http://scorejava.com/wordpress351/?cat=2
Or do you have some other solutions?
Tnx
Andrea
If wordpress code cannot find a category.php then it will use the index.php file.
index.php is like the fallback file.
The hierarchy structure for the categories go like
1> category-slug.php (Note: available with Version 2.9)
2> category-ID.php
3> category.php
4> archive.php
5> index.php
That is, if you do not have a category-slug.php (lets say category-news.php), WordPress will check for a category-ID.php (like category-6.php), and so on.
So i would suggest you create a category-slug.php file (where slug will be your category's slug).
for more info check out this link.
http://codex.wordpress.org/Category_Templates