Problems, need help? Have a tip or advice? Post it here.
5 posts Page 1 of 1
Hi, I am new to Couch but so far quite like it.

The question i have lies in the following:

I have the following site structure:
.htaccess (includes basic rewrite rules, different from gen_htaccess.php)
index.php
/web
--index.php
--blog.php
--blog_list.php
--etc
/smartphone (for tablets and smartphones)
--index.php
--blog.php
--blog_list.php
--etc
/mobile (for other devices)
--index.php
--blog.php
--blog_list.php
--etc
/app (for configs of forms and device recognition)


When i follow your Sample Portfolio Site, on the backend all pages even for just /web are being shown with the link to the site.com/index.php and not being differentiated.
What should i do about it.

Also how do i do if i want to have the mobile, smartphone and web page (say index.php foreach version) to have slightly different information.
Hi and welcome,

When i follow your Sample Portfolio Site, on the backend all pages even for just /web are being shown with the link to the site.com/index.php and not being differentiated.
Not sure if I understood that correctly. Did you mean the 'View site' link on the top by that? If so, that always lead to the index page in the root.

Please let us know in more detail about the problem.

how do i do if i want to have the mobile, smartphone and web page (say index.php foreach version) to have slightly different information.
From what can be seen from your site's structure, you have used separate templates for mobile, smartphone and web page. You can use different editable regions in the templates to put in different information.
Basicaly, it always picks up only index.php, due that index throug the .htaccess redirects to the correct page, blo.php and about.php in the admin at the bottom of editable areas button view, leads to index.
in pm i can send you site and credentials, to the admin.

I was rying to follow thread about multilingual, but in my url for all folders (web, mobile, and smaryfone) the url leads to url.com/about.php and therefore just reagions are not working
Yes, please PM me your site's FTP+Couch access creds.

Thanks.
@suddenhit, thanks for the creds. I had a look at your site.

What you are trying to do is figure out the visitor's device and serve him one of the three versions of the site accordingly (namely - web, mobile or smartphone).

That is a fairly regular requirement now a days but the way you have currently implemented things will not work with Couch.

As per your implementation, when a visitor visits 'blog.php' (a template that does not exist), you use PHP 'include' directive to load a Couch managed template (e.g. 'mobile/blog.php') that matches the visitor's device. This will mess up the way templates work in Couch as the URL in the browser's address bar does not match the template's name.

The right way of implementing a mobile ready site in Couch would be to have a single template (blog.php) that defines all editable regions. When it gets visited, figure out the device being used and then use cms:embed to show the device specific HTML.

Please see the following post for a similar implementation
viewtopic.php?p=10628#p10628

Hope this helps.
5 posts Page 1 of 1
cron