You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by remi tassing <ta...@gmail.com> on 2012/02/17 05:06:09 UTC

Solritas: Modify $content in layout.vm

Hi all,

How do we modify the "$content" variable in the layout.vm file? I could
managed to change other stuff in doc.vm or header.vm but not this one.

Is there any tutorial on this?

Remi

Re: Solritas: Modify $content in layout.vm

Posted by Erick Erickson <er...@gmail.com>.
Why do you want to? That is what are you trying to accomplish by
modifying that variable? You may not really need to...

This seems like an XY problem...

Best
Erick

On Thu, Feb 16, 2012 at 11:06 PM, remi tassing <ta...@gmail.com> wrote:
> Hi all,
>
> How do we modify the "$content" variable in the layout.vm file? I could
> managed to change other stuff in doc.vm or header.vm but not this one.
>
> Is there any tutorial on this?
>
> Remi

Re: Solritas: Modify $content in layout.vm

Posted by remi tassing <ta...@gmail.com>.
Yeah, that works for now. I'll check that §content thing later on.

Thanks man!

Remi

On Sunday, February 19, 2012, Erik Hatcher <er...@gmail.com> wrote:
> Unfortunately things a bit messy in there because others have tried to
make a kitchen sink of things in there, but as I said, it all starts with
browse.vm and then follow any #parse's from there.  You'll see browse.vm
#parse's "facets.vm", and in there you'll see how it then #parse's to those
various pieces you mention, so you can just remove, say, the
#parse('cluster.vm') in there (and subsequently clean it up and actually
remove the now unused cluster.vm file if you like).  And so on.
>
>        Erik
>
>
> On Feb 18, 2012, at 10:23 , remi tassing wrote:
>
>> Yes, I'm using the example configuration (Solr-3.4).
>>
>> What I'm trying to do is to remove the menus on the left side ("Query
>> Facets", "Range Facets", "Clusters"), and the "boost by price" button.
I'm
>> not using them for now and they're kind of distracting.
>>
>> Thanks, again, in advance!
>>
>> Remi
>>
>> On Fri, Feb 17, 2012 at 11:56 PM, Erik Hatcher <erik.hatcher@gmail.com
>wrote:
>>
>>> $content is output of the main template rendered.
>>>
>>> To modify what is generated into $content, modify the main template or
the
>>> sub-#parsed templates (which is what you've discovered, looks like)
that is
>>> rendered (browse.vm, perhaps, if you're using the default example
setup).
>>> The main template that is rendered is specified as v.template (in the
>>> /browse handler definition in solrconfig.xml, again if you're using the
>>> example configuration).
>>>
>>> Does that help?  If not, let us know what you're trying to do exactly.
>>>
>>>       Erik
>>>
>>>
>>>
>>>
>>> On Feb 16, 2012, at 23:06 , remi tassing wrote:
>>>
>>>> Hi all,
>>>>
>>>> How do we modify the "$content" variable in the layout.vm file? I could
>>>> managed to change other stuff in doc.vm or header.vm but not this one.
>>>>
>>>> Is there any tutorial on this?
>>>>
>>>> Remi
>>>
>>>
>
>

Re: Solritas: Modify $content in layout.vm

Posted by Erik Hatcher <er...@gmail.com>.
Unfortunately things a bit messy in there because others have tried to make a kitchen sink of things in there, but as I said, it all starts with browse.vm and then follow any #parse's from there.  You'll see browse.vm #parse's "facets.vm", and in there you'll see how it then #parse's to those various pieces you mention, so you can just remove, say, the #parse('cluster.vm') in there (and subsequently clean it up and actually remove the now unused cluster.vm file if you like).  And so on.

	Erik


On Feb 18, 2012, at 10:23 , remi tassing wrote:

> Yes, I'm using the example configuration (Solr-3.4).
> 
> What I'm trying to do is to remove the menus on the left side ("Query
> Facets", "Range Facets", "Clusters"), and the "boost by price" button. I'm
> not using them for now and they're kind of distracting.
> 
> Thanks, again, in advance!
> 
> Remi
> 
> On Fri, Feb 17, 2012 at 11:56 PM, Erik Hatcher <er...@gmail.com>wrote:
> 
>> $content is output of the main template rendered.
>> 
>> To modify what is generated into $content, modify the main template or the
>> sub-#parsed templates (which is what you've discovered, looks like) that is
>> rendered (browse.vm, perhaps, if you're using the default example setup).
>> The main template that is rendered is specified as v.template (in the
>> /browse handler definition in solrconfig.xml, again if you're using the
>> example configuration).
>> 
>> Does that help?  If not, let us know what you're trying to do exactly.
>> 
>>       Erik
>> 
>> 
>> 
>> 
>> On Feb 16, 2012, at 23:06 , remi tassing wrote:
>> 
>>> Hi all,
>>> 
>>> How do we modify the "$content" variable in the layout.vm file? I could
>>> managed to change other stuff in doc.vm or header.vm but not this one.
>>> 
>>> Is there any tutorial on this?
>>> 
>>> Remi
>> 
>> 


Re: Solritas: Modify $content in layout.vm

Posted by remi tassing <ta...@gmail.com>.
Yes, I'm using the example configuration (Solr-3.4).

What I'm trying to do is to remove the menus on the left side ("Query
Facets", "Range Facets", "Clusters"), and the "boost by price" button. I'm
not using them for now and they're kind of distracting.

Thanks, again, in advance!

Remi

On Fri, Feb 17, 2012 at 11:56 PM, Erik Hatcher <er...@gmail.com>wrote:

> $content is output of the main template rendered.
>
> To modify what is generated into $content, modify the main template or the
> sub-#parsed templates (which is what you've discovered, looks like) that is
> rendered (browse.vm, perhaps, if you're using the default example setup).
>  The main template that is rendered is specified as v.template (in the
> /browse handler definition in solrconfig.xml, again if you're using the
> example configuration).
>
> Does that help?  If not, let us know what you're trying to do exactly.
>
>        Erik
>
>
>
>
> On Feb 16, 2012, at 23:06 , remi tassing wrote:
>
> > Hi all,
> >
> > How do we modify the "$content" variable in the layout.vm file? I could
> > managed to change other stuff in doc.vm or header.vm but not this one.
> >
> > Is there any tutorial on this?
> >
> > Remi
>
>

Re: Solritas: Modify $content in layout.vm

Posted by Erik Hatcher <er...@gmail.com>.
$content is output of the main template rendered.

To modify what is generated into $content, modify the main template or the sub-#parsed templates (which is what you've discovered, looks like) that is rendered (browse.vm, perhaps, if you're using the default example setup).  The main template that is rendered is specified as v.template (in the /browse handler definition in solrconfig.xml, again if you're using the example configuration).

Does that help?  If not, let us know what you're trying to do exactly.

	Erik




On Feb 16, 2012, at 23:06 , remi tassing wrote:

> Hi all,
> 
> How do we modify the "$content" variable in the layout.vm file? I could
> managed to change other stuff in doc.vm or header.vm but not this one.
> 
> Is there any tutorial on this?
> 
> Remi