By garg on
I need some help making a node that has a preview button. Clicking on the preview button will apply CSS code to a preview.php page. Then the user will be able to view the results the CSS and they can copy and paste the CSS and put it on their own site.
I currently have a node with a CSS field. I just need a preview button that can send the data inside the CSS field to a file called preview.php.
Please let me know if any one can help. This is a very tiny and quick job. Thank you.
Comments
Your explanation is
Your explanation is confusing, I really have no idea what you are trying to do?
Pimp your Drupal 8 Toolbar - make it badass.
Adaptivetheme - theming system for people who don't code.
I'm sorry. I agree that that
I'm sorry. I agree that that was not a good description :) I'll make it better.
I want to provide profile layouts for people using services such as tagworld, hi5 and myspace. Those sites let users enter in their own custom CSS to alter the way their profiles look. I want to create custom CSS templates for those sites. Users would be able to choose a layout that they like, click a preview button to see what it will look like, and then if they like the preview they'll copy and paste the CSS on to their profile on hi5, tagworld or myspace.
Currently I have used CCK, Views and Contemplate drupal modules and I made a custom node type that allows the admin to enter Title, Screenshot, CSS code, description, and author.
Example site: http://mygen.co.uk/index.php?page=layouts&sortby=art
Notice that that site has a preview button. When the preview button is clicked the CSS in that specific node gets sent to a preview.php file and then users can view what their page would look like.
I need that sort of preview button so that it can send the CSS to the preview page.
I hope that was better :)
Thanks.
I just did something like
I just did something like this, although it was a template creator for a client of mine. I found the best way to do it was actually theming the various nodes, such as node-template.tpl.php for a preview, rather than messing with the Drupal "preview" button.
If you'd like some help, turn on your contact or send me an email.
I can do it
If I understand correctly:
- you want different categories of layouts for hi5, tagworld or myspace
- next to each layout will be button which will open preview window with profile styled with relevant CSS
Contact me: http://drupal.org/user/20365/contact
I can do it for you.
Gauranga
Thank you all for your time.
Thank you all for your time. The solution has been found and I won't need this any more :)
Take care.