Can you create URL based on the folder structure?

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Can you create URL based on the folder structure?

EveOnline
Hi, I have been working with Hippo CMS for a short time now.
And I have been wondering if there is a way to create URL's based on the folderstructure you are using.
Currently I only know how to create links through the sitemap, but this isn't very dynamic, since you select the folder you want create an overview from.

Example Current folderstructure for my agenda
Root/
-- Year
---- Group
------ Event_ID
-------- Agenda
---------- Day 1 (or day)
---------- Day 2 (or day)
------ Event_ID
-------- Agenda
---------- Day 1 (or day)
---------- Day 2 (or day)
---- Group
------ Event_ID
-------- Agenda
---------- Day 1 (or day)
---------- Day 2 (or day)
-- Year
---- Group
------ Event_ID
-------- Agenda
---------- Day 1 (or day)
---------- Day 2 (or day)
------ Event_ID
-------- Agenda
---------- Day 1 (or day)
---------- Day 2 (or day)
---- Group
------ Event_ID
-------- Agenda
---------- Day 1 (or day)
---------- Day 2 (or day)


My current URL : site/agenda/day1
Goal : site/Event_ID/agenda/day1 or site/Group/Event_ID/agenda/day1

Now I want is to create a link for the agenda without having to create new sitemapping for each day.
Also at a later date I want to be able to filter the agenda based on the authentication so that if you have the correct login you can see agenda's from different groups or certain events.

I haven't really found anything in Hippo CMS that can do these things, so can anyone point me in the right direction or has anyone done this before?.

Reply | Threaded
Open this post in threaded view
|

Re: Can you create URL based on the folder structure?

Jeroen Reijn
Administrator
Hi,

yes that should be quite trivial as well.
Try create a sitemap item called:

_any_ at the root level or when using the hst configuraiton editor
from the cms name it **

the _any_ matcher should have a relative content path of {1} which
will do a direct mapping of url to cms content path.

Cheers,

Jeroen



On Thu, Aug 9, 2012 at 9:14 AM, EveOnline <[hidden email]> wrote:

> Hi, I have been working with Hippo CMS for a short time now.
> And I have been wondering if there is a way to create URL's based on the
> folderstructure you are using.
> Currently I only know how to create links through the sitemap, but this
> isn't very dynamic, since you select the folder you want create an overview
> from.
>
> *Example Current folderstructure for my agenda
> Root/
> -- Year
> ---- Group
> ------ Event_ID
> -------- Agenda
> ---------- Day 1 (or day)
> ---------- Day 2 (or day)
> ------ Event_ID
> -------- Agenda
> ---------- Day 1 (or day)
> ---------- Day 2 (or day)
> ---- Group
> ------ Event_ID
> -------- Agenda
> ---------- Day 1 (or day)
> ---------- Day 2 (or day)
> -- Year
> ---- Group
> ------ Event_ID
> -------- Agenda
> ---------- Day 1 (or day)
> ---------- Day 2 (or day)
> ------ Event_ID
> -------- Agenda
> ---------- Day 1 (or day)
> ---------- Day 2 (or day)
> ---- Group
> ------ Event_ID
> -------- Agenda
> ---------- Day 1 (or day)
> ---------- Day 2 (or day)*
>
> My current URL : site/agenda/day1
> Goal : site/Event_ID/agenda/day1 or site/Group/Event_ID/agenda/day1
>
> Now I want is to create a link for the agenda without having to create new
> sitemapping for each day.
> Also at a later date I want to be able to filter the agenda based on the
> authentication so that if you have the correct login you can see agenda's
> from different groups or certain events.
>
> I haven't really found anything in Hippo CMS that can do these things, so
> can anyone point me in the right direction or has anyone done this before?.
>
>
>
>
>
> --
> View this message in context: http://hippo.2275632.n2.nabble.com/Can-you-create-URL-based-on-the-folder-structure-tp7579001.html
> Sent from the Hippo CMS 7 mailing list archive at Nabble.com.
> _______________________________________________
> Hippo-cms7-user mailing list and forums
> http://www.onehippo.org/cms7/support/forums.html



--
Jeroen Reijn
Solution Architect
Hippo

Amsterdam - Oosteinde 11, 1017 WT Amsterdam
Boston - 1 Broadway, Cambridge, MA 02142

US +1 877 414 4776 (toll free)
Europe +31(0)20 522 4466
www.onehippo.com

http://about.me/jeroenreijn
_______________________________________________
Hippo-cms7-user mailing list and forums
http://www.onehippo.org/cms7/support/forums.html
Ard
Reply | Threaded
Open this post in threaded view
|

Re: Can you create URL based on the folder structure?

Ard
On Thu, Aug 9, 2012 at 9:29 AM, Jeroen Reijn <[hidden email]> wrote:

> Hi,
>
> yes that should be quite trivial as well.
> Try create a sitemap item called:
>
> _any_ at the root level or when using the hst configuraiton editor
> from the cms name it **
>
> the _any_ matcher should have a relative content path of {1} which
> will do a direct mapping of url to cms content path.

Exactly! If you start out with the archetype created project, you can
see that below 'news' in the content you can add any folder and any
document and it will just be available on the site without changing
your sitemap at all. This is because the sitemap contains

news
  |-**
  `-**.html

Where nodename in sitemap:

_any_ == **
_default_ == *

Also see [1]

Regards Ard

[1] https://wiki.onehippo.com/display/CMS7/SiteMapItem+Matching


>
> Cheers,
>
> Jeroen
>
>
>
> On Thu, Aug 9, 2012 at 9:14 AM, EveOnline <[hidden email]> wrote:
>> Hi, I have been working with Hippo CMS for a short time now.
>> And I have been wondering if there is a way to create URL's based on the
>> folderstructure you are using.
>> Currently I only know how to create links through the sitemap, but this
>> isn't very dynamic, since you select the folder you want create an overview
>> from.
>>
>> *Example Current folderstructure for my agenda
>> Root/
>> -- Year
>> ---- Group
>> ------ Event_ID
>> -------- Agenda
>> ---------- Day 1 (or day)
>> ---------- Day 2 (or day)
>> ------ Event_ID
>> -------- Agenda
>> ---------- Day 1 (or day)
>> ---------- Day 2 (or day)
>> ---- Group
>> ------ Event_ID
>> -------- Agenda
>> ---------- Day 1 (or day)
>> ---------- Day 2 (or day)
>> -- Year
>> ---- Group
>> ------ Event_ID
>> -------- Agenda
>> ---------- Day 1 (or day)
>> ---------- Day 2 (or day)
>> ------ Event_ID
>> -------- Agenda
>> ---------- Day 1 (or day)
>> ---------- Day 2 (or day)
>> ---- Group
>> ------ Event_ID
>> -------- Agenda
>> ---------- Day 1 (or day)
>> ---------- Day 2 (or day)*
>>
>> My current URL : site/agenda/day1
>> Goal : site/Event_ID/agenda/day1 or site/Group/Event_ID/agenda/day1
>>
>> Now I want is to create a link for the agenda without having to create new
>> sitemapping for each day.
>> Also at a later date I want to be able to filter the agenda based on the
>> authentication so that if you have the correct login you can see agenda's
>> from different groups or certain events.
>>
>> I haven't really found anything in Hippo CMS that can do these things, so
>> can anyone point me in the right direction or has anyone done this before?.
>>
>>
>>
>>
>>
>> --
>> View this message in context: http://hippo.2275632.n2.nabble.com/Can-you-create-URL-based-on-the-folder-structure-tp7579001.html
>> Sent from the Hippo CMS 7 mailing list archive at Nabble.com.
>> _______________________________________________
>> Hippo-cms7-user mailing list and forums
>> http://www.onehippo.org/cms7/support/forums.html
>
>
>
> --
> Jeroen Reijn
> Solution Architect
> Hippo
>
> Amsterdam - Oosteinde 11, 1017 WT Amsterdam
> Boston - 1 Broadway, Cambridge, MA 02142
>
> US +1 877 414 4776 (toll free)
> Europe +31(0)20 522 4466
> www.onehippo.com
>
> http://about.me/jeroenreijn
> _______________________________________________
> Hippo-cms7-user mailing list and forums
> http://www.onehippo.org/cms7/support/forums.html



--
Amsterdam - Oosteinde 11, 1017 WT Amsterdam
Boston - 1 Broadway, Cambridge, MA 02142

US +1 877 414 4776 (toll free)
Europe +31(0)20 522 4466
www.onehippo.com
_______________________________________________
Hippo-cms7-user mailing list and forums
http://www.onehippo.org/cms7/support/forums.html
Reply | Threaded
Open this post in threaded view
|

Re: Can you create URL based on the folder structure?

EveOnline
Ok so how I have tried it now is this



overviewday is page to show the listing of 1 day
I have now put the content path on the main folder which has sub-folders Day 1, Day 2, ....

but with the content path on the main folder I get all the days when I only want what is in one folder.
site/agenda/Day%201

Any suggestions?
Ard
Reply | Threaded
Open this post in threaded view
|

Re: Can you create URL based on the folder structure?

Ard
On Thu, Aug 9, 2012 at 1:51 PM, EveOnline <[hidden email]> wrote:

> Ok so how I have tried it now is this
>
> http://hippo.2275632.n2.nabble.com/file/n7579014/Hippo_CMS_7.png
>
> overviewday is page to show the listing of 1 day
> I have now put the content path on the main folder which has sub-folders Day
> 1, Day 2, ....
>
> but with the content path on the main folder I get all the days when I only
> want what is in one folder.
> site/agenda/Day%201
>
> Any suggestions?

Check out the archetype created project and login to
http://localhost:8080/cms/console

Over there, look at the hst:hst/hst:configurations/_yourproject_/hst:sitemap

I think that is much easier to understand. For developers, the console
for hst configuration is much easier to understand than the hst config
editor.

Take a look at the sitemap item matchers below 'news'. You there see
** and ${1} kind of stuff. ${1} refers to the first wildcard matched
value, ${2} to the second. Etc

Also see the wiki for request matching

Last thing:  We have trainings which explain all these concepts as it
is not in my capabilities to explain everything over email. If a
training is not an option for you I'd recommend to check out the wiki
documentation, check out the gogreen, and try to understand the
archetype created project

Regards Ard

>
>
>
> --
> View this message in context: http://hippo.2275632.n2.nabble.com/Can-you-create-URL-based-on-the-folder-structure-tp7579001p7579014.html
> Sent from the Hippo CMS 7 mailing list archive at Nabble.com.
> _______________________________________________
> Hippo-cms7-user mailing list and forums
> http://www.onehippo.org/cms7/support/forums.html



--
Amsterdam - Oosteinde 11, 1017 WT Amsterdam
Boston - 1 Broadway, Cambridge, MA 02142

US +1 877 414 4776 (toll free)
Europe +31(0)20 522 4466
www.onehippo.com
_______________________________________________
Hippo-cms7-user mailing list and forums
http://www.onehippo.org/cms7/support/forums.html