How to create a base template and use it to wrap other templates in Ionic framework? - ionic-framework

I couldn't find anything about this. basically i want to create a base template, with all the head tag and container in body or menu, etc... so that other templates can extend it.
how would i achieve this with Ionic framework?

The way you have phrased your question leads one to think you have not quite understood how Ionic works...
A typical Ionic app has only one index.html file with a <head>. The rest of the .html files are just content templates to be rendered as the content of that page. So you don't need the "base template" you are asking about, that is all taken care of by Ionic, from the index.html.
I would suggest reading and following http://ionicframework.com/docs/guide/starting.html

Related

Creating a new page template in Typo3

I'm using Typo3 for the first time and have been asked to update a site built on it.
Making changes to existing templates so far has been OK since they were mainly CSS changes or replacing images. Now though I need to create a couple of new page templates.
What's the easiest way to go about this? The existing site has a home.html and layout.hmlt in the fileadmin directory. Do I need to create a new html file there, if so how do I use this as a new template for some of my pages?
I'm coming from a mainly WordPress background in terms of CMS (I've nearly given in a recoded the site as a WordPress site since I think it would be quicker at this stage) but I'd really prefer to figure this out.
Any suggestions would be greatly appreciated as I'm pulling my hair out trying to read through the documentation and getting nowhere. The site is using Typo3 version 4.4.6
Thanks!
How you add a new template to your page depends on how templating is handled. Sadly TYPO3 has a poor templating out of the box, so there is most likely an extension that does the job on your site.
Probably one of these:
automaketemplate
templa_voila
flux & fluidpages
Check if one of these extension is installed and add a new page template according to the extensions manual or specify your question afterwards.
Edit:
If plain TYPO3 was used, you'll find something like
page = PAGE
page.10 = TEMPLATE
page.10 {
file = fileadmin/myTemplate.html
}
in your Typoscript. You can add tmplate files like the ones that are already there. To use a different template on a page, you have to replace the page.10.file with the template you want to use. This can be done with a new template record (crated in backend via the template module). But this is a rather anoying procedure to change the template, because you have to create each time you want to change the page template for a page and its children. That is why mostly extensions are used for this.
The out of the box situation gets better with newer TYPO3 versions but in 4.4.6 there are no Backend Layouts that could be uses for a template switch ot something like that.
In Addition to change the mere file you have to adjust the subparts or marker that are filled with the content. You'll find that configured in your TypoScript as well

Ionic adding pages

I just started using the ionic-framework and I know that with jQueryMobile you need to add the pages inside the same html with a page id and link to it.
But how do multiple pages work with the Ionic Framework?
On this example:
http://codepen.io/ionic/pen/AjgEB
I see that they use
<script id="file.html" type="text/ng-template">
Am I supposed to do it that way?
No. Normally, one adds the pages in separate files.
The above notation is just used for codepens or similar sites, where you can not add additional files into your online code.
You should take a look at an ionic starter app. Create one by writing
ionic start myApp
into your console.
This may be old post, but i created a tool with ability to generate ionic seed apps with all required pages. For ex., if you need a profile page for your app, using this tool, you can specify pages you need and it will generate the app with all necessary files and references in index.html.
Link for the tool:
http://ionic-sarav.rhcloud.com/#/ionicbuilder/home

How to add CSS, Images to a page in CQ5?

I am creating a new template and then a page from SCRATCH in CQ5. But I can't find the option to add my own CSS/images/JS to the page.
I mean a place to add/upload the actual files.
All the tutorials I've seen talk only about creating a template based on an existing template. Is there any tutorial on how to create the page from scratch ?
Your CSS and JavaScript go into nodes under /etc/designs/[your project's name]/clientlibs. (Ordinarily, you would set the page property cq:designPath of your content's home page to be /etc/designs/[your project's name] to point to this.) It's common practice to set up a subfolder of clientlibs called default, where your general-purpose style sheets and JavaScript go; you can set up other clientlibs for special-case script and style sheets. The simplest way to incorporate your script and style sheets into your page template is the <cq:includeClientLib> JSP tag.
The Adobe docs on clientlibs will also be useful to you, and explains how to use the tag.
#David , thanks for your answer, but for now, I got a better way to add and then use external files using WebDAV with CQ5.
The basic integration of WebDAV with CQ5 application is mentioned in this page

Teamsite component or template

I was wondering if page templates can be built instead of individual components in Teamsite 7? I've seen other cMS systems where it is just a page template that has lots of functionality built I and you can "switch" on and off elements that you want to display instead of having to drag components onto a page? Is this possible?
Old question, but since I just came across it:
Yes, TeamSite supports templates (.template) files which can be partial or full page templates. The default location is iwadmin/main/livesite/template.
I recommend downloading the developer guides from Autonomy's web site for detailed information.
Templates in teamsite/livesite is like a bag that can contain components. But in order for a functionality to be developed in teamsite/livesite we need to create components. certainly we can avoid dragging and dropping components in each page by creating templates and dropping components within it for once. Keep in mind templates are bound to layouts. for each type of layout we need to create a template. Please have a look at TS_7.3_SiteDeveloper_rev1, Chapter 5.
Yes, you can create templates instead of dragging components.
Since, TeamSite supports templates (.template) files which can be partial or full page templates and resides at location : iwadmin/main/livesite/template.
So, whenever you try to create a new page everytime the HTML code required for that page gets automatically added with the template and layouts you selected.
But, again this is not good since you can have any number of templates you need but this could create confusions at times when you try to create a new page since you will need to remember every template name and contents that you will need for a particular page so it's better to have small lists of templates and layouts since then we can say that there is reusability in our application/website which we are going to develop using Teamsite and Livesite.
Please vote the solution if its helpful.
Thanks!

How to add a template in to Symphony projects

I am new in Symphony and would like to add a new design. Here I have attached the file which I want to integrate in the user side. How is this possible?!
You'll need to use templates. Make sure you read through that page.
Chapter 2 of the Say Hello to Symphony tutorial deals with templates, and is a nice way of getting to grips with how it works.
Hopefully this will give the basic idea of how to control the HTML output using XSLT. You will then need to create your CSS to style your HTML.