Dear all,
I've got one of those new-b Q's that should be obvious but it isn't to me....
I'm running a Drupal 6.14 site and it's themed with a custom theme.
I want to add a flash page without any of the menu systems / general template content, just 100% flash with a javascript loader in the HTML header. HTe page would be a pop-up page.
I also want the page to be 'secure' so users not logged in couldnt view it, so I'm thinking that I cant just use a HTML page and link to it.
How do I do this? Do I have to create a new template? If so do I also need to create a new node type? What would I call the node / template?
Sorry, I know this is probably a dumb Q but I cant get my head round it at the moment so thought I'd 'ask the community'.
Thank you ever so much
Chris
Comments
bumping...
Further to yesterdays post:
I can create a custom template if i rename the .tpl file page-node-595.tpl.php BUT I need this to work for all node types... why doesnt it still work if i call the template page-node-pageflip.tpl.php?
(pageflip is the machine readable name that the content type is called, that I would like to create a custom template page for)
Any help on this would be very gratefully recieved, spent over a day renaming a file! arghhhhhhh!!!!
Thanks
Chris
still need help..
I've found out part of the problem...
That I needed to flush the cache before the template would show up.
But I still have a problem in that if the template is called page-node-595.tpl.php it allows total control over the template, yet if I use page-node-pageflip.tpl.php or node-pageflip.tpl.php the template still appears to have a lot of inheritance from another template?
I just want a blank HTML page that I can load content into using the CMS and authenticate access? Is this the easiest way? How can I use the template for content type but not inherent another template?
Someone surely must be able to help here?
Thanks in advance!
Chris
page-[content-type].tpl.php
page-[content-type].tpl.php is not a default template suggestion for Drupal, so you will need to tell Drupal to use such a template.
You do this in the themename_preprocess_page function for you theme, set the conditions for which this template should be used and add it to the suggestions array.
Something like this:
Where your page template is called page-pageflip.tpl.php and as long as there is a page.tpl.php file in the same directory Drupal will pick it and use it whenever a node of the type "pageflip" is loaded.
node-pageflip.tpl.php is only going to theme the Node, not the whole page, so you'll need both and quite possibly, from what I can tell, your page template will need to look something like this:
Pimp your Drupal 8 Toolbar - make it badass.
Adaptivetheme - theming system for people who don't code.
Excellent
Thanks, this makes sense to me, I was really stuck with this as I'm new to drupal and havent got involved with the template side before. This help is ever so helpful, thanks again!
One more query
A slight issue has arose, when I do this, I loose my 'normal' edit screen, infact if I type 'node/X/edit' to access the edit screen my page isnt as id like... its the basic HTML that I wanted for my pure flash node.
How do I redirect edits to be the normal page?
Thanks again, this has been a life/time saver!
Chris :)