I would like to enter a static one page Html site to Drupal CMS,
But I did not find a clear way for the implementation of the process.
How can I insert my static site on Drupal?
You could create a Basic Page node, including your HTML code as the "Body" field of the node. Make sure you save your "Body" field as full HTML. Otherwise, some HTML tags could not work properly.
With Bustikiller's solution you will be using template of Basic Page content type.
My suggestion is to create new content type, let's call it "test".
Then create a template file for it, name it node--test.tpl.php and place it in:
/sites/all/themes/your-theme-name/templates
(or change template name to fit your content type name)
Clear the cache and your new test content type will start using this new template.
Place your static html into that template file.
Create a node (page) in that template file and when you open it your template file with your static html will be used.
If you want to have it editable instead of editable parts print field values..i.e. body field value...or value(s) of the fields you added to that content type.
That way your page will not share Basic Pace common html, but has it's own. But page and html templates will still be shared.
Related
I'm a WordPress developer who's been tasked to create a temporary one-pager to a Drupal site. The client would like to have a simple front page with a logo and 4 external links until their new site is ready. Normally I'd just make a simple index.html page with some CSS and call it a day. But in this case they need some of the sub-pages from the Drupal site to continue to work.
Had it been a WordPress site, I would have just created a new template file and a new page inside WordPress, and made that the front page. But as I have zero experience with Drupal, I don't know if you can do the same thing here.
What is the easiest (quickest) way to make a simple splash-page as the front page, while having the rest of the drupal site continue to work? The splash-page should ignore all CSS and JS from the original theme — preferably have a completely independant section fromt the rest of the site.
In Drupal 7 you have few "levels" of templates. First you have "most outer" template html.tpl.php It contains html head and it is usually common for all pages.
Then inside that html.tpl.php you'll include page.tpl.php. That one should again contain some common page elements, as header and footer, but again, if your design requires that, you can have more than one page template.
Page template will include node template. In drupal you have 2 basic content (node) types but you can create many more of them. Basically for every different page layout you can create new content type (but there also are lot of different ways to achieve the same thing).
Basically you should create new content type called i.e. "splash" (machine name!). Add fields to it if they need to be back-end editable.
Then you should create new template file for your content type. Name matters, so you should call it node--splash.tpl.php . You can find and copy to your theme existing node.tpl.php and change it to your needs.
Keep in mind that when ever you add/remove new template file you have to clear the cache so drupal would scan theme directory, notice and start using new templates.
And if you need also different page template for you page you'll have to put some code into you tamplate.php file:
https://www.digett.com/insights/overriding-page-templates-content-type-drupal-7
Drupal template engine design an specific file name for override front page.
You can create the file html--front.tpl.php, and this will be used only for the front page without touch any other page. You can page here your custom HTML and reference css/js.
If the page you need share common styles with the rest of the site, I would recommend to instead override page--front.tpl.php which is basically the content of the page without the tags
For more information here is a link https://www.drupal.org/docs/7/theming/howto/customize-the-front-page-template
I am a beginner for sitefinity, so sorry for long post, not sure if its already answered, couldn't find out.
As working on sitefinity-8, looking for best option to select separate css while creating page each time.
I know, I can use different theme for different css, which will not work in my case, as we are having long list of css to use in whole site. Also I know, I can add css or any link into the head tag option of page properties or I can add css widget on the page itself to select css for that page only, but our requirement is to select css file while creating the page itself, this will make easy for novice editors too.
Basic thing I tried, to add css script tag into template, made it editable on page. So I can select css, but it exposes server folders, which is not ideal. Wish is there any way so that we can configure to select folder from sitefinity content- Documents & Files. But didn't find out a way to do so.
Other thing I tries, I have created custom field (related media-images, videos, files) for page to select a document & use as a link to add into head tag (to say link to add css for page.) With this custom field I can select needed document from appropriate folder from sitefinity backend itself, not from server. When I am looking into page source, I could see the link tag is there, but href attribute is empty. I also tried with adding related media tag into template the page is using, but the issue is same, no any value in href attribute.
Struggling to resolve this since long time, seeking for expert's advice.Thanks in advance.
The custom field path you've chosen should work - you will need a custom widget on the Page Template that will read the value of the custom field.
The GetRelatedItems extension method of the page node should give you the document object that was selected.
Having the document the widget will have to inject a link in the head of the page with the proper css attributes.
I know a WordPress page is constructed from
The page template assigned to the page,
The style sheet assigned to the page, and
Some HTML.
And I know you can use the Page editor to insert custom HTML. But where does this HTML go? The template is a .php file. The style is a .css file. Is there a file also for the HTML associated with the page? Or is there maybe just a database record that holds the HTML, i.e., the HTML that isn't in the template?
All of your pages, unless they have a custom structure are being served from the page.php file in your themes root. All pages you create via the Page Editor, including the posts are being stored in a table in your database called wp_posts
The schema for wp_posts is as follows:
The information you are editing in the Post / Page editor including html is stored into post_content column in this database table. This includes html, images, hyperlinks, etc.
Go into your sites database and look around, there are a couple of tables which can be seen from the expanded version of this image.
I have got images in my content type and i want to show them in node type.
I've tried to use flexslider, but it doesn't format it.
http://i.stack.imgur.com/wUFk3.png
When i try to use field slideshow module, i had result like this
http://i.stack.imgur.com/P3CT5.png
So, i cannot choose carousel skin. Files path is /sites/all/libraries/jquery.jcarousel/skins
Guys, how i can make a slider with thumbnails in drupal?
You could try this module Views Slideshow JCarousel
You don't need drupal module for everything - a lot of stuff you can do on your own by using custom content types and 3rd party JS libraries:
Define content type, as you did, to hold data and make page editable.
Create new content type for page displaying effect.
Find some JS library (don't have to be drupal related) doing your effect
Create template file for your second content type
Copy HTML from that JS library example page inside your template file
Include necessary JS and CSS file - make it work static first.
Create some view to get effect data from your original content type
Use views_get_view_results() to get effect data inside your second content type. Loop trough it and print out data you get instead of static values
Or use views_embed_view() instead - makes no bid difference.
Check this out, it's what you're searching for https://www.drupal.org/project/galleria
I need to create an asp.net website which will allow the end users to select a prestored template from available templates, edit header, footer and body contents of the template and create a HTML page that will be stored in a physical folder of website with names like test1.html, test2.html, etc.
Can somebody please suggest me how can I achieve this?
You can you CKEditor or tinymce for same, First of all you can created pre-define template in your project and user can select those pre-define template and modified it in CKEditor and stored on physical location(on drive).
It's might be helpful.