How do I add static pages in oxid (and manage them)?

I would like to have several static content pages (no articles or categories, but still with the whole navigation and basket intact).

I have several questions regarding this:

How do you go about displaying a static page in the template (if the current page is static content and not a category list or similar, I want to remove the slider and some other things)?

I have several CMS-Pages that I use on the start page that have to link to this static content. Do I have to “hardcode” the link into these CMS-Pages or can I add some kind of tag that uses the id of the page (so that if I change the SEO URL, it will still work)?

Can I “group” CMS-Pages and iterate through them in the theme? I may have 1-n CMS-Pages of a particular “type” and want a CMS-Page that’s added to this group to be automatically displayed on the start page. I also may need to make minor adjustments to the markup depending on the number of CMS-Pages in that group.

Create a static page: Go to customer information CMS-pages and create a page, select “snippet” for pagetype. Use a human readable ident instead of the auto-generated one. Save it and switch to Tab “SEO” to see the SEO-url generated for this page.

Link to this page from other CMS-pages: unfortunately OXID chose to change the footer “info”-list into a widget, but you can look up the code in older versions:

    [{oxifcontent ident="yourPageIdent" object="_cont"}]
        <a href="[{ $_cont->getLink() }]">[{ $_cont->oxcontents__oxtitle->value }]</a>
    [{/oxifcontent}]

Group CMS Pages: There is a module for this: https://github.com/livelongandprosper/content_page_by_cms_folder

Thank you. I don’t suppose there is an “oxifcontentelse”? I guess I’ll have to add a check variable.

And since I want to keep module dependencies to a minimum, I guess I’ll think of something else for the CMS-Page-Groups, too. Not the end of the world, just would’ve been a nice plus if it worked out of the box.

Can I assume from your answer that I have to use the SEO-Link of the CMS-Page I want to link to? Or rather using the (never changing) ID of the CMS-Page I want to link to and generate the SEO link from that ID is not possible?

> Thank you. I don’t suppose there is an “oxifcontentelse”?

I suppose not…

> And since I want to keep module dependencies to a minimum,

I understand but you can also see it from another side, modules are a way to keep the templates free from application code.

> Can I assume from your answer that I have to use the SEO-Link of the CMS-Page I want to link to?

If you want to link from a CMS-Page you can use the oxifcontent code-snippet i posted, which uses the ident (“Ident.” in “Main” Tab) of the page. Oxid will present the SEO-Link automatically then. If you want to link from outside you can use the SEO-link or a link like http://demoshop.oxid-esales.com/community-edition/index.php?cl=content&oxloadid=oxorderinfo&lang=1 which uses the id.

I think you misunderstood. I’m not going to put non-presentation logic in the theme. I’ll just do something else with the space, that’s not a problem. Putting business logic in templates will always come back to bite you shudders

Also I feel a bit dumb for not realizing the getLink() method was in the example code you posted. Sorry for asking the obvious :slight_smile:

In any case, thanks for your time.