• twitter image
  • facebook image
  • youtube image
  • linkedin image
Language: CMS Made Simple Czech CMS Made Simple France CMS Made Simple Spain CMS Made Simple Hungary CMS Made Simple Russia CMS Made Simple Netherlands

All times are UTC




Post new topic Reply to topic  [ 6 posts ] 
Author Message
 Post subject: News module specifying priority within the tab
PostPosted: Sat May 30, 2020 1:19 pm 
Offline
Forum Members
Forum Members

Joined: Mon Dec 05, 2011 4:40 pm
Posts: 85
Location: Voorburg, Nederland
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?


Top
  Profile  
 
Share On:
Share on Facebook Share on Twitter Share on Google+
 Post subject: Re: News module specifying priority within the tab
PostPosted: Sat May 30, 2020 2:31 pm 
Offline
Dev Team Member
Dev Team Member
User avatar

Joined: Wed Feb 25, 2009 4:25 am
Posts: 987
Location: Victoria, BC
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.

_________________
Not getting the answer you need? CMSMS support options


Top
  Profile  
 
Share On:
Share on Facebook Share on Twitter Share on Google+
 Post subject: News module specifying priority within the tab
PostPosted: Sat May 30, 2020 3:25 pm 
Offline
Forum Members
Forum Members

Joined: Mon Dec 05, 2011 4:40 pm
Posts: 85
Location: Voorburg, Nederland
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


Top
  Profile  
 
Share On:
Share on Facebook Share on Twitter Share on Google+
 Post subject: Re: News module specifying priority within the tab
PostPosted: Sat May 30, 2020 3:42 pm 
Offline
Forum Members
Forum Members

Joined: Mon Dec 05, 2011 4:40 pm
Posts: 85
Location: Voorburg, Nederland
\$1:
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.

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?

After that, the jquery is no problem.


Top
  Profile  
 
Share On:
Share on Facebook Share on Twitter Share on Google+
 Post subject: Re: News module specifying priority within the tab
PostPosted: Sat May 30, 2020 3:53 pm 
Offline
Dev Team Member
Dev Team Member
User avatar

Joined: Wed Feb 25, 2009 4:25 am
Posts: 987
Location: Victoria, BC
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.

_________________
Not getting the answer you need? CMSMS support options


Top
  Profile  
 
Share On:
Share on Facebook Share on Twitter Share on Google+
 Post subject: Re: News module specifying priority within the tab
PostPosted: Sat May 30, 2020 4:14 pm 
Offline
Forum Members
Forum Members

Joined: Mon Dec 05, 2011 4:40 pm
Posts: 85
Location: Voorburg, Nederland
Thanx, I see the whole picture now :)

I have in config 'permissive_smarty' enabled so the path is easy to get.


Top
  Profile  
 
Share On:
Share on Facebook Share on Twitter Share on Google+
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 6 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Hosting Nation - Managed CMSMS Hosting