Page 1 of 1

Maginot Filename Without Extension?

PostPosted: Thu Mar 06, 2008 10:05 pm
by Darren
Does Maginot have a variable that will render the filename without the extension?

I am using a Maginot Static Split profile to allow me to create multi-page news stories. My file paths are like so:

/news/2008/03/news_story_headline.shtml
/news/2008/03/news_story_headline2.shtml
/news/2008/03/news_story_headline3.shtml
/news/2008/03/news_story_headline4.shtml

I've just run into a case where I need to include the path of the final page in the news style. I tried this:

/news/<Field: Year>/<Field: TwoDigitMonth>/<MaginotFile: News_Split>


But of course that gives me "news_story_headline.shtml" instead of "news_story_headline4.shtml".

I can use the <Field: SplitNumber> variable to get the final page number in there, but obviously I need it to actually appear inside the filename.

If there is no such variable, how could I go about snipping the final 6 characters from the filename to create a work-around (e.g. <Field: SnippedTitle><Field: SplitNumber>.shtml)?

Thanks!

PostPosted: Sat Mar 22, 2008 5:14 am
by Darren
Figured it out -- there are filename prefix and suffix variables for Maginot Split profiles. To produce the filename of the current page:

Code: Select all
<Field: FileNamePrefix><Field: SplitNumber>.<Field: FileNameSuffix>