Hi to everyone,
I want to link my results from searchfn to the page, not only to the component.
At the moment I have:

[code][#if queryStr?has_content]
    [#assign searchResults = mySearchfn.searchContent('website', queryStr, 
'/home', 'mgnl:component') /]
[#assign recordsFound = searchResults?size /]

        <h3>  <em>${recordsFound}</em> Results -> "${queryStr}"</span></h3>

    <div class="list-group">
    [#if searchResults?has_content]
        [#list searchResults as item]
        <a href="${cmsfn.link(item)}" class="list-group-item">
            <p class="list-group-item-text">${item.excerpt!}</p>
            </a>


        <p class="list-group-item-text">${item.page!}</p>
                <!--return:getPath() of the node (pointing to component) as 
String-->
        <p class="list-group-item-text">${item.pageLink!}</p>
                <!--return:path/to/page as String-->

        [/#list]
    [/#if]
        </div>

[/#if][/code]

the url I get from [i]<a>[/i] tag is something like 
[i]"path/to/page/area/component"[/i], the problem is I can't see the full page, 
only the component.

[code] <a href="${cmsfn.contentByPath(item.pageLink, 
"website")}">link</a>[/code]
 
 given the example above, only builds the url as [i]/page[/i] not building with 
full string ([i]path/to/page[/i])

-- 
Context is everything: 
http://forum.magnolia-cms.com/forum/thread.html?threadId=4c0684e3-468b-4fd2-b00d-8565098e5aa5


----------------------------------------------------------------
For list details, see http://www.magnolia-cms.com/community/mailing-lists.html
Alternatively, use our forums: http://forum.magnolia-cms.com/
To unsubscribe, E-mail to: <user-list-unsubscr...@magnolia-cms.com>
----------------------------------------------------------------

Reply via email to