Hi all,
My client (the editor) likes the priority & tab feature option in the "content" tag. It's great to organize content in the best way.
My client asked me to do the same on the News module. I defined several field definitions and he asked me for a better priority. His question is to put 2 wysiwyg fields between the content + status field. If this is possible, how do I do this?
News module specifying priority within the tab
Re: News module specifying priority within the tab
You would need to copy the News module edit article template (I think editarticle.tpl) to /assets/module_custom/News/templates/, then edit it to display how you want.
There's various ways to do it, but I think in this case I would remove everything, {include} the original template so it's upgrade-safe, then just add some jquery to reorder the fields how you want. The default and custom fields all have unique IDs so can be manipulated easily.
There's various ways to do it, but I think in this case I would remove everything, {include} the original template so it's upgrade-safe, then just add some jquery to reorder the fields how you want. The default and custom fields all have unique IDs so can be manipulated easily.
Not getting the answer you need? CMSMS support options
News module specifying priority within the tab
Thank you so much!
I copied file: modules/News/templates/editarticle.tpl
to folder: assets/module_custom/News/templates/
Then changed the copied file and it works like a charm.
Thanx for the support, Ronald
I copied file: modules/News/templates/editarticle.tpl
to folder: assets/module_custom/News/templates/
Then changed the copied file and it works like a charm.
Thanx for the support, Ronald
Re: News module specifying priority within the tab
I want to give this a try too. What do you mean with "I would remove everything"? If I upload the template file "editarticle.tpl" in uploads/www/ then how or where to include this file in cmsms?in this case I would remove everything, {include} the original template so it's upgrade-safe, then just add some jquery to reorder the fields how you want.
After that, the jquery is no problem.
Re: News module specifying priority within the tab
By remove everything I mean essentially just have a blank file with the same name in the module_custom path specified above, then use Smarty's {include} to include the original template file. That way if the original template file changes when the module is upgraded, you're still using the most recent code.
So your custom template would look something like:
{include file='/full/path/modules/News/templates/editarticle.tpl'}
<__script__>
do stuff
</__script>
Make sure the /full/path bit is the full path in your file system starting with root. If you get a 500 error, you probably have the path incorrect.
So your custom template would look something like:
{include file='/full/path/modules/News/templates/editarticle.tpl'}
<__script__>
do stuff
</__script>
Make sure the /full/path bit is the full path in your file system starting with root. If you get a 500 error, you probably have the path incorrect.
Not getting the answer you need? CMSMS support options
Re: News module specifying priority within the tab
Thanx, I see the whole picture now
I have in config 'permissive_smarty' enabled so the path is easy to get.
I have in config 'permissive_smarty' enabled so the path is easy to get.