Skip to content

Routing #154

Closed
notomato opened this Issue Jul 18, 2013 · 3 comments

3 participants

@notomato

I was wondering if there were any plans to add some kind of routing support to wordless? I've seen a plugin here http://wordpress.org/plugins/wp-router/ that looks reasonable, but would be happy to implement something if we could agree on what form it should take?

@pioneerskies pioneerskies was assigned Jul 19, 2013
@pioneerskies
weLaika member

Hi there!

Are you sure that WordLess is not doing the same thing here: https://github.com/welaika/wordless/blob/master/wordless/theme_builder/vanilla_theme/index.php#L13 ?

If yes, what's the concept's diffs?

Thanks for your interest in WordLess!

edit: probably you're talking about url based routing vs. query based routing and so a way to route /mytass/summer/offers without have to create a 3 level page structure within the backend...am I right? But let discuss about it :)

@notomato

Hey,

Yeah - I always find that if you are doing a non-typical WordPress site and want to use it more as a content repository you don't really need any of the in-built routing. Although the if/else statements are fine, they get a bit unwieldy.

I'm thinking more along the lines of:

create_route('/path/to/{:id}/{:args}', 'template', $data, 'route_name');

and url_to('route_name', $params); in the templates.

I know there are quite a few issues around WordPress globals to sort out so I'm not 100% convinced of this approach but I do find it frustrating trying to use the inbuilt routing.

What PHP version does Wordless require/support as a minimum?

@mukkoo
weLaika member
mukkoo commented Jul 16, 2015

This issue is too old. Too many changes we have done on Wordless. I hope you reopen a new issue if will need more help.

@mukkoo mukkoo closed this Jul 16, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.