wzhao6898 Posted March 26, 2010 Share Posted March 26, 2010 Hi there,I'm trying to create a new FAQ page using CMS tools, and I'd like to use dojo library. I understand I can edit the Header.tpl to add the dojo library import codes, but when I use TinyMCE editor to edit HTML source code, certain dojo specific tags got automatically removed every time I commit the changes. How can I edit the source code of the CMS generated page? or how do I add a new page in PS manually but using PS theme and layout?Thanks very much!David Link to comment Share on other sites More sharing options...
Ciscowrig Posted March 26, 2010 Share Posted March 26, 2010 Sorry - not familiar with CMS and TinyMCE - HOWEVER, I do create pages using the .tpl and .php files. I will try and give an overview, but I may leave something out so feel free to ask.Step OneIn your main prestashop folder create a new php file called whatever you'd like...maybe faq.php.In your text editor copy in this data and save it... If you don't want the page blocked from those not logged in, delete the two lines... if (!$cookie->isLogged()) Tools::redirect('authentication.php'); <?php include(dirname(__FILE__).'/config/config.inc.php'); if(intval(Configuration::get('PS_REWRITING_SETTINGS')) === 1) $rewrited_url = __PS_BASE_URI__; include(dirname(__FILE__).'/header.php'); if (!$cookie->isLogged()) Tools::redirect('authentication.php'); $smarty->assign('HOOK_HOME', Module::hookExec('home')); $smarty->display(_PS_THEME_DIR_.'faq.tpl'); include(dirname(__FILE__).'/footer.php'); ?> Step TwoIn your themes folder that you're using (in my case it's themes/electonix) create a faq.tpl file. If you choose a different page name you need to change that in the code above where "faq.tpl" is.Copy in this data and play with it however you want. This page you should be able to view in a WYSIWYG editor to a certain extent, but you won't be able to make hardly any css style changes. I have put iFrames, and just text in between the divs with success. Some of my pages have the login requirement. Some do not.The capture part will be in your breadcrumb, the h2 part will be your heading if your theme uses one. You also may need to edit what is in the tpl file based on your theme. Open a few of the current .tpl files to see if you notice any serious differences or start from one instead of the code below {capture name=path}{l s='FAQ'}{/capture} {include file=$tpl_dir./breadcrumb.tpl} {l s='Frequently Asked Questions'} 3 Link to comment Share on other sites More sharing options...
impie Posted October 9, 2010 Share Posted October 9, 2010 For a long time I was looking for a solution to integrate some things and saw your help...It works great and I wanne say thanks to you, it helps me very much greetz,imm Link to comment Share on other sites More sharing options...
noesac Posted October 9, 2010 Share Posted October 9, 2010 Thanks so much!! I've also been looking for a solution here for a long time. Link to comment Share on other sites More sharing options...
ferdydek Posted December 17, 2010 Share Posted December 17, 2010 OK. So basically we have a file /faq.php - how does this work with editing contect of FAQ in internal CMS of Prestashop? Can I somehow connect it with the CMS category?Doesn't it exclude the content of FAQ from sear engines? Link to comment Share on other sites More sharing options...
carvemore Posted May 13, 2011 Share Posted May 13, 2011 Dumb question on this thread...how do you access the actual page?Thanks for your help Link to comment Share on other sites More sharing options...
ukmacnut Posted September 4, 2011 Share Posted September 4, 2011 I'm just a newbie but I found this tip useful. I had the same question about how to access the page. I used this method: Alter your blockcms.tpl file in the modules folder (or in your theme folder if you have a custom theme) to add: <li class="first_item"><a href="{$link->getPageLink('faq.php')}" title="{l s='faq' mod='blockcms'}">{l s='faq' mod='blockcms'}</a></li> after the lines <!-- MODULE Block footer --> <ul class="block_various_links" id="block_various_links_footer"> Then you will see a link to the faq page in the bottom footer on every page. Link to comment Share on other sites More sharing options...
Recommended Posts