TypoScript: additional HTML-Template for each Content Element - templates

I want to create some kind of a blog, and therefor I thought it is clever to create an HTML-Template for each Content Element on a page.
How do I configure the typoscript to "load" an additional HTML-Template for each content element and put data like headline, author, pubDate... into the marks of that html-Template?

Install Extension Builder extension it will allow you create sample blog extension in several minutes of clicking....
Note: for TYPO3 ver. 4.7.x use Extension Builder with version lower than 2.5.0, and do TYPO3 ver. 60 just take the newest one.

I would recommend using the extension "news" (see http://typo3.org/extensions/repository/view/news). It seems that you're new to TYPO3. Therefore I wouldn't start with programming an own blog extension. For the beginning the before mentioned news extension will pretty much suit your needs.
Creating your own fields and using your own templates is not that easy and doesn't make sense since there are ready build and reliable extensions.

Related

What is the alternative for sc:EditFrame in Sitecore MVC

The project I'm working on is a new Sitecore 8 site build using MVC and with a demand for page-editor support. The simple fields are being addressed with the FieldRenderer.render() method, but there are also some droplink and multilist fields that need to be available in page editor.
In webforms you could use the sc:editframe control for that, but how can I get the same functionality while using Sitecore MVC?
Just an FYI in Sitecore 8.2 there is support for edit frames:
#using Sitecore.Mvc.Extensions
Then
#using(Html.EditFrame(...)) {...}
If not already, I highly recommend using GlassMapper to map your Sitecoce object to strongly typed objects in your code.
With Glass, you can then use the BeginEditFrame concept to replace the sc:EditFrame functionality of WebForms.
To take it a step further, look to implement edit frame buttons (this link is not Sitecore 8 specific, but the method to implement edit frame buttons is the same) in the core database to allow a very-friendly Experience Editor experience.

Sitecore field for selecting multiple files from media library with the ability to upload files

I'm looking for something that allow content editors to select multiple files from the media library, which will be listed in a rendering. They also need to be able upload files and to search. It has to work in the Page Editor (named Experience Editor in version 8).
What I have have considered so far:
A bunch of File fields - but I don't know how many files the editor need to select at most, and having something like 20 similar fields seems bad.
Using a field that supports multiple items like a Treelist with the datasource set to the Media Library allows the user to select files in an acceptable way but not uploading. I tested adding one File field just for the upload function, but was not really satisfied.
Notes:
Currently using Sitecore 7.5 but moving to 8 in a few days, so a solution working in Sitecore 8 is preferred.
I have asked the Sitecore support too and will update here if I get useful answers.
And the winner is.... the answer from Sitecore support:
In the Email Experience Manager module there is a field called "File List".
The image shows the dialog in Sitecore 8 and the field itself (below). It has search, supports multiple files and upload. It stores the value as pipe-separated GUIDs (just as similar fields like Treelist).
The Field Types Module on Sitecore Marketplace includes "Visual List" and "Carousel" custom field types which may provide what you need. I have used this in the past and found it to work well, though I'm not sure if it's compatible with Sitecore 8. As I remember, I don't think they provided the option for uploading new media from the field.
An alternative solution is to use a placeholder and a file component with a DataSource.
Give the component a standard File Field. So upload is possible.
But for every new file the editor must add a new component to the placeholder with the page editor. This is with a lot of files more work for the editor. But a standard solution. (and the ability to personalize the files with the rules engine)

Dreamweaver type templates in Aptana

I am designing a very small website using basic HTML. I usually use a CMS but it has been a while since I did just HTML files, I was wondering if there was some sort templating where you can have like areas like a "Master template" and when a section is changed or added to the rest of the HTML pages that have those sections change with it. Like a common header and footer so I don't have to make the changes in each page if I need to make a change to an element.
I am using AptanaStudio 3 and was wondering if there was a feature like that as there is in Dreamweaver. I don't have Dreamweaver installed on my new computer, so taht is not an option.
Thanks in advance
You can try server-side includes (SSI): http://www.htmlgoodies.com/beyond/webmaster/article.php/3473341/SSI-The-Include-Command.htm

Opencart module development - Inject javascript/html code in some pages

I'm a beginner on Opencart and just started developing a module for Opencart which it must inject some lines of javascript and html code in these pages:
- Cart Page
- Product Page
- Confirmation Order Page
- Register form page
The official documentation doesn't have informations about how can i do that, I've tried to find a good documentation about OpenCart but I didn't find anything.
I need help. How can I do that?
Diggin necro topics;) :
The easiest way i think:
upload/catalog/view/theme/[themename]/template/product/product.tpl - here you can add your custom html for product page
[your theme name, you shouldnt overwrite default theme because it can cause damage after update]
It depends on where you're trying to insert the HTML/JavaScript.
Doing things the proper way in OpenCart, you're limited to the column-left, column-right, content-top, and content-bottom positions.
The files you'll need to create are:
admin/controller/module/mymodule.php
admin/language/english/module/mymodule.php
admin/view/template/module/mymodule.tpl
catalog/controller/module/mymodule.php
catalog/language/module/mymodule.php
catalog/view/theme/default/module/mymodule.php
To learn how to do this the first time, it's easiest to replicate an existing stock OpenCart module (preferably a simple one, such as information). Once you've replicated it you'll need to go through each of those files and replace any references to "information" with "mymodule".
After that, if you've done it properly, you should be able to navigate to Admin > Extensions > Modules and see your module in there. Then install it, use the "Add module" button to position the module on all the relevant layouts, hit save and hey presto you have a working module on the front-end.
To modify the front-end output, just edit catalog/view/theme/default/module/mymodule.php
If you want to insert your HTML somewhere other than the 4 available positions OpenCart gives you, position your module in the content-bottom position and use JavaScript/jQuery to inject some HTML where you want.
If this is for your own personal website then as Pawel S suggested it would be easiest to simply modify the relevant view files (ie. catalog/view/theme/[themename]/template/product/product.tpl), however if you're making a module which you plan to distribute then this should be a last resort.
Hope that helps!
I realize this is probably long dead by now, but if you're creating a module that needs to modify existing controllers, languages, models or views the correct tool to use is vQMod.
vQMod allows you to modify existing code on the fly using XML.
https://code.google.com/p/vqmod/

default languages for items and folders in sitecore

I'm working in a multi-site, multi-lingual sitecore project, and from time to time, someone adds lots of content on certain sub-site, fight hours with the publishing and being unable to see the updated content, and eventually realise after a couple of hours that all the input was in the wrong language for the sub-site.
So i'm wondering if there is a way in sitecore to support the following:
a folder (for a sub-site) that supports that after clicking an existing item below it, the language automatically changes to the default language for the site folder
since the language is automatically changed, new items created below that folder will be created in the default sub-site language, unless the user explicitly changes it to something else
If the above is impossible or not supported, an excellent workaround would be to be able to change the language of an item language version (say, i created an english version for a page on a spanish site with all the content in spanish, so i want to tell sitecore that i want to make this version actually the spanish version, without going into copying fields manually in the translate ui
It sounds like you might want to consider a few things:
The Language Fallback Provider - this allows you to have have content fallback from one language to another if it doesn't exist.
A custom extension (maybe an event handler for item:creating or item:created) to Sitecore to switch the context language based on where an editor is creating an item.
Just ideas right now...
An alternative approach would be to work with language read and language write security settings for your content contributors.
If your contributor for your Spanish site should only be adding items in Spanish then configure their access settings so that they aren't allowed to create content in other languages.
If you have a lot of content that has been entered in the wrong language then you can use the Globalization - Export language tool (from the Start menu) to export it to an XML file, manually replace the language tags (this is as simple as a search and replace on "en>" -> "es-ES>" for example) and then reimport it in the new language using the Globalization - Import language tool. Warning though: this WILL overwrite any existing versions.