Prevent theme template overiding plugin template

Prevent theme template overiding plugin template , a forum discussion on Jojo CMS. Join us for more discussions on Prevent theme template overiding plugin template on our Plugin Support forum.

Back to Forum Index : Back to Plugin Support   RSS
synfield

21 Jul 2008
Posts: 43

I have copied renamed artcles plugin (as "products") to generate my products page, however when I click on the "read more" link I get redirected back to the products page rather than get the requested single product page.

I'm using $pg_url in a section of my theme template to render the products pg if "products" is present in the URL, however this seems to overide the default jojo_product.tpl in the plugins templates folder.

How can I prevent this ?

Regards.
tom

Developer

tom

23 Jul 2008
Posts: 379

the readmore link ought to link to the product url as generated by getProducts in your plugin, which is called by global.php to produce the product index.

check there first to see what url is being sent through.

also, you may need to check in the api file to see what URI patterns have been set for Jojo to recognise as references specific to this plugin eg
Jojo::registerURI("$prefix/[id:integer]/[string]", 'Jojo_Plugin_Jojo_article');
which depends also on the prefix being correctly set

Back to Forum Index : Back to Plugin Support   RSS
You must be logged in to post a reply



You need to Register or Log In before posting on these forums.