Hi Mike!

Looks like there may be some confusion between Page and Paragraph models.

STKTemplate model is a (Page-)Template model. It can't be used on paragraphs.
You need a Paragraph model to assign to your paragraph, but I don't think that 
will solve your problems. The Paragraph models (even the ones used in STK) all 
inherit from RenderingModelImpl and don't implement the method you need.

I think what you might need is something more like:   
${model.parent.searchPageLink}. That lets you access the parent model (usually 
that of the page, unless you have paragraphs nested in each other), and 
retrieve the property from there.

Hope that helps!

Regards from Vienna,

Richard

-----Ursprüngliche Nachricht-----
Von: [email protected] [mailto:[email protected]] 
Im Auftrag von Magnolia Forums (on behalf of Mike Herzog)
Gesendet: Dienstag, 14. Juni 2011 13:45
An: Magnolia User List
Betreff: [magnolia-user] Create a site search paragraph


Hi,
we would like to be able to put the site search box in a paragraph. We want it 
to be moveable like other paragraphs.

Using STK, now the problem is that ${model.searchPageLink} is not available in 
my paragraph definition. I found out, that the model class of my 
searchBoxParagraph is info.magnolia.module.templating.RenderingModelImpl which 
has no searchPageLink. I need something like ...STKTemplateModel.
Just setting the model class property node to STKTemplateModel results in an 
exception:

> Can't create rendering model:
>   NoSuchMethodException: No such accessible constructor on object: 
> info.magnolia.module.templatingkit.templates.STKTemplateModel

What can I do?

Regards, Mike.

-- 
Context is everything: 
http://forum.magnolia-cms.com/forum/thread.html?threadId=0b712499-c066-49ed-88d0-e7a59bdb6fe2


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





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

Reply via email to