I am stuck on a couple things.

[b]VirtualURIs[/b]

Let's say I have URLs like these:

/myProject/news.html?id=1
/de/myProject/news.html?id=1

And I'd like them to be virtually re-mapped to:

/myProject/news/1
/de/myProject/news/1

I've set up the following Content Node under 
modules/adminInterface/virtualURIMapping, which uses the 
RegexpVirtualURIMapping class and defines fromURI as

/de/myProject/news/(.*)

and toURI as:

forward:/de/myProject/news.html?id=$1

Shouldn't this work? Also, how can I get it to automatically concatenate the 
language, if present? In other words, to not have to make a separate URIMapping 
for each language?

[b]includeTemplate[/b]

I have a bunch of pages. On most of these pages most everything - top menu, 
side menu, footer - is exactly the same. The only thing that changes is the 
content in the middle of the page.

So for example, to make the topMenu I have a Collection of topMenu paragraphs, 
each one with a title, subtitle and url. In order to display them on the page, 
I do the very typical:

[#assign i=mgnl.inherit(content).topMenuCollection /]
[#list i?children as kid]
  [@cms.includeTemplate contentNode=kid /]
[/#list]

My question is, how can I make this 4-line block of code into its own template 
and use includeTemplate (or some other tag/command) to include it? Like a 
<jsp:include>? 

It's just plain nuts to have to put these 4 lines of code in every page. But 
includeTemplate seems to only be used for Paragraphs, not templates (confusing 
name ...)

Thanks for any help!
Bob

-- 
Context is everything: 
http://forum.magnolia-cms.com/forum/thread.html?threadId=b3117667-2b53-47f7-ad72-a7d039bb66bd


----------------------------------------------------------------
For list details see
http://www.magnolia-cms.com/community/mailing-lists.html
To unsubscribe, E-mail to: <[email protected]>
----------------------------------------------------------------

  • [magnolia-user] A couple more... Magnolia Forums (on behalf of Robert Bowen)

Reply via email to