Creating Newscoop Subdomain Alias
  • How exactly does one create a new alias based on a subdomain? Newscoop is installed in the root folder, and the alias www.domain.com works fine (with one of the publications set to it). I've tried creating sub.domain.com, and create an alias "sub.domain.com" to point another publication to, but to no avail. Help, please!
  • 1 Comment sorted by
  • Hi Vicnan,

    The problem is not clear to me. Here briefly how Aliases work and what they are aim for:

    Let's say you have your online magazine under: http://www.domain.com
    ... then there must be a publication alias www.domain.com

    If at the same time you want that same publication to be available via: http://m.domain.com
    ... then you must create the alias m.domain.com

    At this point your Website will be accessible via two different sub-domains, the content you serve is exactly the same, at least that you present something different based on the sub-domain (or alias) in use. In Newscoop you can do that by doing something like this in the templates:

    {{ if $gimme->publication->site == "www.domain.com" }}
        ... code rendering standard content here
    {{ elseif $gimme->publication->site == "m.domain.com" }}
        ... special content here
    {{ /if }}

    You can also have entirely different publications, let's say the standard site under www.domain.com and a blog service under blog.domain.com. In that case you don't need to validate anything in templates, you only create different templates.

    Now, aliases do not work across publication, and data cannot be shared in a direct way between two different publications. If you want to present content from one publication into the second one, it is possible but you must do it building the logic in the template.

    Hope this helps !