Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Magazine design - Text variables for next month...

Community Beginner ,
Nov 23, 2016 Nov 23, 2016

Hi there,

I'm a magazine designer, and I've just moved from a company where we had CMS and the month and year in the folios were automatically updated. I've moved to a smaller company and am hoping I can set up the same system, so we don't have to edit the month every time. I've found the way to create the current month Text Variables>Define>New>Type: Modification date but I'm looking for ways to forward date it by a month.

The code we used where I used to work was <%+1m><%M> <%Y> which would give us the next month and year.  (i.e.. December 2016)

(Using CS4 and CMS)

And now all I can get is the current month with MMMM yyy (ie. November 2016)

(Using CC and no CMS)

Is there the capability to achieve this in InDesign alone?

Any help would be great

Thanks,

Flo

1.5K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
People's Champ ,
Nov 23, 2016 Nov 23, 2016
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Nov 23, 2016 Nov 23, 2016

Not sure where you're looking but this is what I'm seeing...

Screen Shot 2016-11-23 at 3.44.30 PM.png

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Nov 23, 2016 Nov 23, 2016

dps_advancedphotographer@ wrote:

Not sure where you're looking...

The link Loic posted will allow you to download a script that adds the "Next Month" functionality to your Text Variables menu.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Feb 09, 2018 Feb 09, 2018

Hi.

I used your script and it was very helpful. But I have another problem. Since I am using my own language and not English, need to use our names of the months. That wasn't a problem to change. Problem is that I need two different lists. I think that in English cause there is called Noun Case. What I basically need is two lists (names of the months)

List 1:

Siječanj

Veljača

Ožujak

Travanj

Svibanj

Lipanj

Srpanj

Listopad

Studeni

Prosinac

List 2:

Siječnja

Veljače

Ožujka

Travnja

Svibnja

Lipnja

Srpnja

Listopada

Studenog

Prosinca

I would like to have both those lists in one same script. Can you help me with that?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Feb 10, 2018 Feb 10, 2018

Yes, English doesn't have this context when referring to months, but other languages like Polish do.

Before the close curly brace i.e. } on line 76, declare another variable but with a different name for the getNextMonth function, e.g. getNextMonthInContext

//Adding next month in context to text variables
createTextVariable(doc, "Next Month in Context", getNextMonthInContext(), true );

Then make another function that is the same as the current getNextMonth() function (lines 78-95) but call it getNextMonthInContext() and change the months to be the months with the context in question.

If the answer wasn't in my post, perhaps it might be on my blog at colecandoo!
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Feb 13, 2018 Feb 13, 2018

So it should look like this (from the line 75 to the 115)?

//Adding next month in context to text variables 

createTextVariable(doc, "Next Month in Context", getNextMonthInContext(), true );

}

function getNextMonth() {

var date = new Date();

var month = date.getMonth();

var Months = ["SIJEČANJ",

"VELJAČA",

"OŽUJAK",

"TRAVANJ",

"SVIBANJ",

"LIPANJ",

"SRPANJ",

"KOLOVOZ",

"RUJAN",

"LISTOPAD",

"STUDENI",

"PROSINAC"];

return Months[month+1];

}

function getNextMonthinContext() {

var date = new Date();

var month = date.getMonth();

var Months = ["SIJEČNJA",

"VELJAČE",

"OŽUJKA",

"TRAVNJA",

"SVIBNJA",

"LIPNJA",

"SRPNJA",

"KOLOVOZA",

"RUJNA",

"LISTOPADA",

"STUDENOG",

"PROSINCA"];

return Months;

}

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
People's Champ ,
Feb 13, 2018 Feb 13, 2018
LATEST

return Months[month+1];

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
People's Champ ,
Nov 23, 2016 Nov 23, 2016

Should have say it's a startup script

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Feb 01, 2018 Feb 01, 2018

Can I edit this Java script? It uses English language and I need local for month variable. I'm new to this scripting business.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Feb 01, 2018 Feb 01, 2018

Yes. Open the jsx file in a TEXT EDITOR (i.e. notepad, textedit, textwrangler... NOT WORD) and look for the line that begins with "function getNextMonth() {". In this function, you will see the months written in English... change them to whatever locale your language is.

If the answer wasn't in my post, perhaps it might be on my blog at colecandoo!
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines